Hi!
i found a indicator script on the net which suit for me .
this indicator draw and alert when crossing specific above and below line.
But one lack of function is when break out line it alert but there is no limit bar .
i want to set 5 bars so if i set 5 bars i want to receive alert in 5 bars only if over 5 bar like 6 , 7 ...
i just want to skip and ignore this alert.
i checked this script and found Close[0] is ok when check current price crossing above or below line but if i limit to 5 bars then it make some difficult for me.
i thought to use iTime function .
for instance if i want 5 bar limits then i thought i can make it with
iTime(_Symbol, 0, 0) + timeoffset > LastTime
so if timeframe is 5min and 5 bars is 25min so i set timeoffset as 1500
but it not working.
i tested with different value but not working .
if anyone enlighten me much appreciate!
If I have understood correctly, this is the changes you want. See the attachment.
You have an input to limit the number of times an alert happens and then resets after some time (as input).
But one lack of function is when break out line it alert but there is no limit bar . i want to set 5 bars so if i set 5 bars i want to receive alert in 5 bars only if over 5 bar like 6 , 7 ... i just want to skip and ignore this alert. i checked this script and found Close[0] is ok when check current price crossing above or below line but if i limit to 5 bars then it make some difficult for me.
if you want alert after(?) 5 bars (your explanation is really not very clear) - can see the signature of iClose
double iClose( string symbol, // _Symbol int timeframe, // _Period int shift // shift at certain bars quantity );
? perhaps you need shift to adjust
LastPrice = iClose(NULL, 0, 6); // 1+5 because when closed the bar is aleady closed & new bar opened, the closed bar is having index [1] + 5 = 6th bar from the right side - break-even occured

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi!
i found a indicator script on the net which suit for me .
this indicator draw and alert when crossing specific above and below line.
But one lack of function is when break out line it alert but there is no limit bar .
i want to set 5 bars so if i set 5 bars i want to receive alert in 5 bars only if over 5 bar like 6 , 7 ...
i just want to skip and ignore this alert.
i checked this script and found Close[0] is ok when check current price crossing above or below line but if i limit to 5 bars then it make some difficult for me.
i thought to use iTime function .
for instance if i want 5 bar limits then i thought i can make it with
iTime(_Symbol, 0, 0) + timeoffset > LastTime
so if timeframe is 5min and 5 bars is 25min so i set timeoffset as 1500
but it not working.
i tested with different value but not working .
if anyone enlighten me much appreciate!