In my strategy, I’m trying to buy when LTP crosses above trigger candle which is candle crossing 20 EMA.
Trigger candle - (-1) candle crossing 20 EMA…I capture high of that candle and store in variable.
Any subsequent candle that crosses the high is where I buy.
Problem: I’m able to capture high of trigger candle in get variable, but the trade doesnt get executed..Pls help
Hey, @rlakkoj In runtime variable “n_ce_high” what instrument high are you storing in it?
Is it same as your LTP you are checking in the condition builder? if possible can you post the screenshot of Get Runtime initialisation, So people can help you quicker.
okay use this : LTP(runtime variable(n_ce_high)) > Get Runtime (n_ce_high)+ 5
Instead on instrument name choose Run time variable in LTP
Hey @rlakkoj n_ce_high has only high value not the instrument name for calculating LTP, add another runtime variable through Instrument name --> NFO–>NIFTY50–>CURRENTWEEK–>CE–>ATM. this variable stores the name of the instrument from which LTP has to be searched for. This will solove your problem.
Yes @rlakkoj this does look good, in condition Builder add one more condition like (Net qty ==0) or some variable which keeps tabs of trade and not run on constant loop.
the condition LTP> HIGH +5 will be true and this might create an unlimited loop, which will result in constant trade placement.
Hope this helps,
cheers