Repair Continuous for exit existing leg(s) and re-enter as well?

Experts,

Writing a simple VIX based Iron Condor.

Now want to exit one spread (lets say CE short and CE long hedge) based on certain condition. And then re-take the CE side spread (CE short with CE long hedge initiated with different strike than the first one).

This should continue whole day.

So where should I put this “exit the initial” and “re-take the trade”? In two separate Repair Continuous or in one Repair Continuous block?

If we put in two different Repair Continuous - is the order of execution is guranteed that S1R1 (exit) followed by S1R2 (Re-entry) occurs?

Please suggest the idea. (Not fully understood yet the semantic of the order of execution in Tradetron).

Best Regards,
Suvra

It can not be in one repair continuous block and has to be 2 separate RC. Use a runtime variable in the 1st RC and use that variable in the 2nd RC. For example, use a variable such as exit_success and set the value to 1. Use get runtime in the 2nd RC to fetch value of exist_success. If exit_success == 1, then the 2nd RC should be triggered. Make sure to reset value of exit_success to 0 using runtime under 2nd RC. This is to make sure 1st one (exit) completed successfully before the 2nd RC gets triggered.

1 Like

Thanks.
One more thing I am not sure. For margin safety, suppose in S1 I took leg-1 as hedge position (CE buy) and leg-2 as short position (CE sell).
Does it ensured that leg-2 will be executed only after completion of leg-1 only? Like sequential execution? Or it will be concurrent? Then gone case :blush:

Their “language” semantic is very unclear :frowning:

Your guess is correct. It doesn’t work in sequential manner. It may not be a problem with TT, but can be because of time lag and back end broker. There is a possibility that back end broker might fail executing them in a sequential manner. So it is better for you to program it in a say that they are executed in a sequential manner (check success of CE buy before executing CE Sell). This is as per my experience of course.