İş tamamlandı
İş Gereklilikleri
I need to compile an simple EA based on two indicators: ATR and CCI.
The EA should open trades based on CCI oscillator on current timeframe, but only in the direction of trend. The trend is defined by ATR stop on an higher timeframe.
Parameters:
ATR Stop; variables: ATR period length, ATR multiplicator,
CCI: variables: period length, buy level and sell level
Lot size: fixed
Stop loss: fixed in pips
Take profit: option 1: fixed in pips option 2: secure profit option
Secure profit: (true or false) position is closed on opening price + predefined “secure profit level”
Secure profit level: (variable) XX pips
Secure profit trigger: secure profit option will be triggered if XY pips are reached (where XY is higher or same as XX)
Current timeframe: (variable) – will be used for the calculation of CCI
Higher timeframe: (variable) – will be used for the calculation of the ATR stop
Trading hours: start hour + start min; end hour + end min (variables)
Open position: - see example
Long: ATR trend on higher TF shows long => CCI on lower TF reaches minimal level (like -180), then trade is opened on next bar open
(when CCI on current TF reaches opposite maximum (like +180) the short trade is not opened, because we are in long trend
Short: ATR trend on higher TF shows short => CCI on lower TF reaches maximal level (like +180), then trade is opened on next bar open
(when CCI on current TF reaches opposite minimum (like -180) the long trade is not opened, because we are in short trend
close position:
Either at TP level (if TP is not null), SL level (if SL is not null), secure profit level (if not null), always if trend on higher TF changes (ATR stop on bar close) - or at opposite CCI signal on current TF (if this variable option is chosen as true)
Maximal open trades: 1
The open of the next trade is be always on next bar open.
The EA should work for all timeframes and on all currency pairs and major indexes.