Spezifikation
I have a quite simple EA which trades Breakouts with a SL, TP and TSL. I would have 2 requirements for a modification:
1.: The EA has a hard coded period where is looks back to define highs and lows for the range. I want this period (in this case 50) soft coded, means I want to define the period into change in the settings of the EA (like TP, SL,...).
Current code for finding high:
double findHigh(){
double highestHigh = 0;
for(int i = 0; i < 50; i++){
double high = iHigh(_Symbol,Timeframe,i);
if(i > BarsN && iHighest(_Symbol,Timeframe,MODE_HIGH,BarsN*2+1,i-BarsN) == i){
if(high > highestHigh){
return high;}
2. I would like to have an additional function that losing trades are covered by an new order once a new regular signal is issued by the indicator / EA again.
- If an EA issues a trade and it is negative, once the EA issues a new regular signal, the new position should be doubled, regardless if it goes into a different direction (buy/sell).
- Once the TP is met, both positions should be closed.
- If the first position recovers and hits its original TP, the second position is now the "first" position and the game continues.
- The EA needs to be adjusted in that way that it can open a 2nd trade like described above.
More than happy to work with you. Just let me know if you have additional questions.