Spezifikation
this ea will run on a 1 day graph.
basically i want a ea that trades using :
donchain ( 20 day )
The sma (14) .
Mac D (14 , 26 ,9).
when the pips break through the donchain resistance line 2 times ,when the sma 14 line passes through a rising pip and when the mac D 14 is above the mac D 26 , then only must a buy trade be started.
the sell trade will be activated when the 3 conditions are met but in reverse ( donchain support line is broken through 2 times, sma 14 passes through a falling pip and the mac D 14 is below the macd 26.)
a trailing stop and a stop loss will also be needed.
the trailing stop will only activate when the 2 mac D crosses , sma crosses the pips , and will be 50% of the ATR ( average true range )
the stop loss will be the buying price - Atr. "" entering price - Average true range "" { buying market }
&&
"" entering price + Average true range "" { selling market }
the position sizing will be 3% of current account value per trade. There will be a maximum of 3 trades taken, all of which would total to no more than 9%
please leave comments throughout the code so that I can understand what I must check when I do back testing on the program.
Conditions for entering a trade
(see attachment for graph explanation)
This is a mac D that uses the same values as the other mac D.
When the histogram shape at the bottom is above proves to be the highest compared to the other charts , it must enter a trade but only if the histogram value is above 0.7.
The chart with the highest gradient must also be chosen
So the top 3 charts must be the charts with the highest gradient of the 14 day ema of the MacD and with a histogram value above 0.7.
Also !!!!!!!!!
I want the EA to be fully automated . it must run on all chats but only trade on 3 at a time. This is important ! if this is not possible , pleas let me know , so that I can change the conditions a bit