Help needed. How to define breakout candle's low.

I want to put initial stoploss few cents below low of breakout day candle. I have tried to code as below but I am not sure whether that is right way to do. Thanks in advance.

breakout=(Close> Ref (HHV(C,252),-1));
breakoutdaylow= ValueWhen(breakout,Low);
sell= close < breakoutdaylow*0.99 or close < ema(c,50) );

Thanks in advance.

@kishordhas ,
Did you run the code? What were the results?

1 Like

Thanks for showing interest. Yes I ran the code, its working , results were little poor than without day low stop. But I am not sure whether I coded it rightly, that is where i need help. If breakout day low is not defined correctly then results wont be correct.

@kishordhas,
"Yes I ran the code, its working , results were little poor"
"But I am not sure whether I coded it rightly"
You've provided no data other than your code snippet. What results did your code produce?
https://www.amibroker.com/guide/afl/applystop.html

My query is- what is right way to define breakout day low? Have I defined it correctly? I am unable to get clearly what results you need to judge that. If you can specify I could post relevant results. Its difficult to post entire results here.

@kishordhas ,
The title of this thread is "How to define breakout candle's low". You have then supplied some code showing your attempt to code a solution. So far, so good.
Now, check your results: are the Sell trades occurring at 99% of the breakoutdaylow or if the close is below the 50 EMA?
You are the one asking if your code works and then reporting that is does (although "results were little poor"). If the code works you have answered your question 'Yes.'

"But I am not sure whether I coded it rightly, that is where i need help."
Pick 5 trades and report back the values of breakout, breakoutdaylow, Sell price, (breakoutdaylow * 0.99) and EMA 50 .

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.