Hello Sheriff, I’m also looking for some help at translating a strategy into an EA:
Use current Time Frame, Use current Currency
Ability to set start and end hours traded
Ability to set Take Profit, Stop Loss, Trailing Stop
Set Take Profit and Stop Loss to 2 x ATR value?
Indicators:
Bollinger Bands (Period: 20, Deviations: 1.65), SMA 20 (middle BB), Parabolic SAR (Step: 0.02, Maximum: 0.2, Precision: 7), ADX(14), ATR(14)
Rules:
Open a long position if the Parabolic SAR reverses and appears below the lower Bollinger Band and the first candle of the reversal closes above the middle Bollinger Band.
If the first candle of the reversal does not close above the middle Bollinger band, wait until a green candle closes above the middle BB and the Parabolic SAR is still below the lower BB.
Only open new position if the ADX(14) base line is greater than 20.
Only open new position if the ATR(14) is greater than 0.0005.
Exit the long position if the Parabolic SAR reverses again and appears above the current candle AND the candle closes below the middle BB.
TP = open price + (2 times ATR value)
SL = open price - (2 times ATR value) *might want to edit the SL to equal 1.5 times ATR value
Open a short position: Reverse of the rules for the long position.
Ability to set Max Stop Loss.
I’ve made an attempt at setting up the logic behind the above rules:
Open Long
1: (+1) previous Parabolic SAR > high
2: (+1) previous close > SMA 20 (middle Bollinger Band)
3: (+0) current Parabolic SAR < lower Bollinger Band (20, 1.65)
4: (+0) current open > SMA 20
5: (+0) current ADX(14) > 20
6: (+0) current ATR(14)>=0.0005
OR
1: (+2) previous Parabolic SAR < lower Bollinger Band (20, 1.65)
2: (+2) previous close < SMA 20
3: (+1) previous Parabolic SAR < lower Bollinger Band (20, 1.65)
4: (+1) previous close > open
5: (+1) previous close > SMA 20
6: (+0) current open > SMA 20
7: (+0) current ADX(14) > 20
8: (+0) current ATR(14)>=0.0005
9: (+0) current ADX(14) > 20
10: (+0) current ATR(14)>=0.0005
Exit Long:
1: (+1) previous Parabolic SAR > high
2: (+1) previous close < SMA 20
OR
TP = buy + (2 x ATR)
SL = buy - (2 x ATR)
Open Short
1: (+1) previous Parabolic SAR < low
2: (+1) previous close < SMA 20
3: (+0) current Parabolic SAR > higher Bollinger Band (20, 1.65)
4: (+0) current open < SMA 20
5: (+0) current ADX(14) > 20
6: (+0) current ATR(14)>=0.0005
OR
1: (+2) previous Parabolic SAR > higher Bollinger Band (20, 1.65)
2: (+2) previous close < SMA 20
3: (+1) previous Parabolic SAR > higher Bollinger Band (20, 1.65)
4: (+1) previous close < open
5: (+1) previous close < SMA 20
6: (+0) current open < SMA 20
7: (+0) current ADX(14) > 20
8: (+0) current ATR(14)>=0.0005
9: (+0) current ADX(14) > 20
10: (+0) current ATR(14)>=0.0005
Exit Short:
1: (+1) previous Parabolic SAR < low
2: (+1) previous close > SMA 20
OR
TP = buy - (2 x ATR)
SL = buy - (2 x TR)
Thank you for your offer!