For output via Gfx or output of text (via GfxTextOut, GfxDrawText, PlotText, PlotTextSetFont) on events like trade signals etc. you have to iterate visible chart area (-> using loop).
Hey Trash,
thanks
as you said :
For output via Gfx or output of text (via GfxTextOut, GfxDrawText, PlotText, PlotTextSetFont) on events like trade signals etc. you have to iterate visible chart area (-> using loop).
you have to iterate visible chart area meaning bar looping?
Code:
SetOption("NoDefaultColumns", True );
[COLOR="DarkOrange"]Plot(C, "",colorLightGrey, styleCandle) //For seeing chart
[/COLOR]
AddColumn( Null, "Symbol", 1, colorDefault, colorDefault, 70 );
AddColumn( Null, "DateTime", 1, colorDefault, colorDefault, 150 );
AddColumn( Null, "bar", 1, colorDefault, colorDefault, 70 );
dt = DateTime();
filter = 0;
for(i=1; i<=10; i++) {
TimeframeSet(i * in1Minute);
up= (ABS(O - C ) <= ((H - L ) * 0.1))
bar= Name() + "\t";
bar= bar+ DateTimeToStr(LastValue(DateTime()))+ "\t";
x= StrFormat("%02g-min", i);
bar = bar+ [COLOR="darkorange"]WriteIf(up, x, "\t");[/COLOR]
addRow(bar );
TimeframeRestore();
m1 = TimeFrameExpand(up,in1Minute);
}
[COLOR="DarkOrange"]for(b=0; b<BarCount;, b++)
{
if(up[b] == True) PlotText(":",b + WriteVal(up),colorAqua, bkcolor =colorDefault);
}
[/COLOR]
PlotShapes(up*shapeSmallCircle,colorGreen,0,Low,-20);
i use i for timeframe
b for bars
I've used plottext because want it under candlestick.
regards
Last edited: