I am currently trying to create a sort of hedging technique but I am very unsure of how to program the EFS for this task. I am programming the strategy so that I can be run using the backtester on a 1 minute chart.
I have set rules to enter a long position and I want to program it so after it gains a certian percentage from the entry point I want it to exit the position. Also if at anytime during the trade any loss or negative percentage happens, I want to enter a short trade (this is the moment the loss happens). And for the short trade to be covered, which must happen before I can exit the long trade, the percentage change since the entry price must either equal 0 or be positive (it cannot be a negative percentage change since the entry price).
I have set rules to enter a long position and I want to program it so after it gains a certian percentage from the entry point I want it to exit the position. Also if at anytime during the trade any loss or negative percentage happens, I want to enter a short trade (this is the moment the loss happens). And for the short trade to be covered, which must happen before I can exit the long trade, the percentage change since the entry price must either equal 0 or be positive (it cannot be a negative percentage change since the entry price).
Comment