• The price of VIP membership is increasing to $199 beginning June 1. Click here to lock in the current rate of $149.

Script question regarding past candles

Castle Hill

New member
VIP
Does anyone know how to not mark a current candle if the last candle was already marked? Let’s say I want to put a flag at 1 candle because it meets my criteria, but I do not want the next candle to get a flag if the first has already been marked.
Any help is much appreciated.
 

Castle Hill

New member
VIP
I tried that with no luck. It ends up removing my flags all together.

Code:
def signal = !flag[1] and flag  ;
AddChartBubble(signal > 0, high, "Here", Color.GREEN, no);

If I use AddChartBubble( !isnan(signal), then it flags everyone except for the first flag.
 

MerryDay

Well-known member
VIP
@Castle Hill if you search through this forum, you will see that the examples given are the accepted method for only plotting the 1st signal.
Without a complete script, we cannot provide any further assistance. If it is a proprietary script, support must be gotten from the authors.
HTH
 

Castle Hill

New member
VIP
So, if I removed the if from my def function and just make my def function read

Def flag =
x
and x
and x

etc then it works. Incorporating the if is causing an issue for some reason.
 

Similar threads

Top