PlotText to plot only below intraday Low candle

Romeo1998

Well-Known Member
#1
Dear friends,
I have tried using plottext function to mention "Day Low" below the intraday low's candle for that day, but it is not working.

I have used this code, but it plots the intraday low value below all the candles of that day
Code:
DL = TimeFrameGetPrice( "L", inDaily, 0 );
for (i=0; i<BarCount;i++)
{
PlotText(  "Day Low = "  + dl[i] , i , L[i] , colorGreen, -1, -20 );
}
and this code plots all the values vertically on the first day's low candle
Code:
DL = TimeFrameGetPrice( "L", inDaily, 0 );
for (i=0; i<BarCount;i++)
{
PlotText(  "Day Low"  + dl[i] , dl[i] , L[i] , colorGreen, -1, -20 );
}
I cannot figure out how to use plottext function and plot "day's low" only below the intraday low's candle. :(
Please kindly guide me friends.
Awaiting your replies.
Thank you.
 

LOVEENAJYOTHI

Well-Known Member
#2
Dear friends,
I have tried using plottext function to mention "Day Low" below the intraday low's candle for that day, but it is not working.

I have used this code, but it plots the intraday low value below all the candles of that day
Code:
DL = TimeFrameGetPrice( "L", inDaily, 0 );
for (i=0; i<BarCount;i++)
{
PlotText(  "Day Low = "  + dl[i] , i , L[i] , colorGreen, -1, -20 );
}
and this code plots all the values vertically on the first day's low candle
Code:
DL = TimeFrameGetPrice( "L", inDaily, 0 );
for (i=0; i<BarCount;i++)
{
PlotText(  "Day Low"  + dl[i] , dl[i] , L[i] , colorGreen, -1, -20 );
}
I cannot figure out how to use plottext function and plot "day's low" only below the intraday low's candle. :(
Please kindly guide me friends.
Awaiting your replies.
Thank you.
Try
Code:
DL=Valuewhen(L==LLV(dl,BarsSince(newday)),1)
 

Romeo1998

Well-Known Member
#4
Try
Code:
DL=Valuewhen(L==LLV(dl,BarsSince(newday)),1)
i tried this
Code:
dl = TimeFrameGetPrice( "L", inDaily, 0 );
DL=Valuewhen(L==LLV(dl,BarsSince(newday)),1);
for (i=0; i<BarCount;i++)
{
PlotText(  "Day Low"  + DL[i] , i , L[i] , colorGreen, -1, -20 );
}
now i m getting "day low 1" on every bar :|
 

Romeo1998

Well-Known Member
#5
Try
Code:
DL=Valuewhen(L==LLV(dl,BarsSince(newday)),1)
i tried this now, added Low after newday
Code:
dl = TimeFrameGetPrice( "L", inDaily, 0 );
DL=Valuewhen(L==LLV(dl,BarsSince(newday)),L,1);
for (i=0; i<BarCount;i++)
{
PlotText(  "Day Low"  + DL[i] , i , L[i] , colorGreen, -1, -20 );
}
now i m getting the text that i wanted, that is, "day low" text along with intraday's low , but it is below every bar :|
 
Last edited:

LOVEENAJYOTHI

Well-Known Member
#6
i tried this now, added Low after newday
Code:
dl = TimeFrameGetPrice( "L", inDaily, 0 );
DL=Valuewhen(L==LLV(dl,BarsSince(newday)),L,1);
for (i=0; i<BarCount;i++)
{
PlotText(  "Day Low"  + DL[i] , i , L[i] , colorGreen, -1, -20 );
}
now i m getting the text that i wanted, that is, "day low" text along with intraday's low , but it is below every bar :|
Code:
dist = 0.001*ATR(1);

for( i = 0; i < BarCount; i++ )
{
if( DL[i] ) PlotText( "DayLow "+L[ i ] , i, L[ i ] - dist[i],colorBrightGreen);
}
 

LOVEENAJYOTHI

Well-Known Member
#7
Code:
dist = 0.001*ATR(1);

for( i = 0; i < BarCount; i++ )
{
if( DL[i] ) PlotText( "DayLow "+L[ i ] , i, L[ i ] - dist[i],colorBrightGreen);
}
EDIT:
Code:
Expand Not needed for timeframegetprice, sorry dint pay attention to ur code and blindly thought u used tfset/restore function

Code:
 Trash, the Savior , As Always does, provided the best in his post below
 
Last edited:

trash

Well-Known Member
#8
The codes in this thread are all incorrect.
You need a condition to check Low of bar with Day's low.


Code:
SetBarsRequired( 1500, 1500 );

Plot( C, "Price", colorDefault, styleCandle );

DL = TimeFrameGetPrice( "L", inDaily, 0 );

LowCond = L == DL;

bi = Barindex();
fvb = FirstVisibleValue( bi );
lvb = LastVisibleValue( bi );
for( i = fvb; i <= lvb; i++ ) {
    if( LowCond[i] ) PlotText( "DayLow " + L[ i ], i, L[ i ], colorBrightGreen, -1, -15 );
}
 

Similar threads