Custom Sl and tgt for Each leg

SID: 7999118

i created a strgy with three leg in Crude oil buying… with portial profit booking of each leg with repair once condition.

supose the strgy have taken a Call buy trde and its got 10pt tgt then it will squre off 1 leg with repair once condition.
1 leg will squre off after 20 pt tgt and 1 las leg with 50pt tgt.

the strgy goes well but what happens is once it stisfied repair once condition for 10pt first leg tgt aur 2nd leg 20 pt tgt and exit the trade… and again it stisfiead enrty condition with same strike price with same it entry and exit next second… and it happens again and again…

whats the solution for that…

help me to run this strgy

this a tradetron official youtube chennel video from which i created that strgy…

i explained this to Kaushik as well on Chat option and on call with the help on Anydesk.

Your coding is wrong. In the Set exit last conditon you comparing LTP < Entry price+ 10. This condition is always true. As soon as you take position, LTP is less than entry+ 10 and hence your strategy exits immediately. Fix this condition.

Also another wrong coding. u are comparing price of Leg1 for all Repaironcr condition 1, 2 and 3. Change the code to compare Leg2 and 3 for Repaironce 2 & 3 respectively