I am trying to build something like below logic is compare with previous candle low with current , this works fine however I just need one alert when the price drops to previous low however in the below code it is keep continuing , is there a way to stop further .
Let say prev low = 100 ,
I need to get the new low as 99.50 ( say two ticks)
even if the price goes below just need to ignore those , Please help me
input ticks = 2.0;
def bearish ;
def bullish;
def tickdifflow = AbsValue(low - low[1] ) / TickSize() ;
def tickdifhigh = AbsValue(high - high[1]) / TickSize();
bearish = low < low[1] and tickdifflow > ticks ;
AddChartBubble(bearish , close , "Bearish @" + close, Color.RED, no);
Let say prev low = 100 ,
I need to get the new low as 99.50 ( say two ticks)
even if the price goes below just need to ignore those , Please help me
input ticks = 2.0;
def bearish ;
def bullish;
def tickdifflow = AbsValue(low - low[1] ) / TickSize() ;
def tickdifhigh = AbsValue(high - high[1]) / TickSize();
bearish = low < low[1] and tickdifflow > ticks ;
AddChartBubble(bearish , close , "Bearish @" + close, Color.RED, no);