Tarea técnica
I am looking for an experienced coder to code the idea behind this recovery strategy:
https://www.youtube.com/watch?v=Fzh4dNhYga0
The main goal of this strategy is not to make money but to save (bring to breakeven) a position gone wrong (cases when the price moved in the opposite direction of the position).
The idea for this EA is simple:
enter in the direction indicated by the supertrend indicator, and place an opposite stop order with the same volume (HEDGE) at X given number of ATRs. If the market moves on the right direction, close all positions at X points profit.
If the market hits the hedge, wait until either position is above X points profit, and a new signal of the supertrend appeared. When these two conditions are met:
1. close the position at profit (and any other position at profit),
2. use the money of the profitable entries to trim (partial close) the volume of the losing positions (starting from the farthest),
3. enter a new position in the direction of the supertrend, and
4. place an opposite stop order (Hedge) at X given number of ATRs .
The volumes to use need to be balanced, such that when all positions are filled there is the same volume in long and short.
These EA should loop through the four steps above until the money of a profitable entry is enough to close all opened positions.
The strategy reduces the dropdown when we avoid hitting the hedge (there the need to use a trend reversal indicator). Basically, we should avoid hitting the hedge.
In a second phase, I would like to implement a function of moving the stop order (hedge) when the market moves in the right direction. what the author of the video calls squeezing the hedge. but we can negotiate this function later.