Bollinger Reversion Strategy – USD/JPY
Forums › ProRealTime English forum › ProOrder support › Bollinger Reversion Strategy – USD/JPY
- This topic has 6 replies, 4 voices, and was last updated 6 years ago by JR1976.
-
-
05/19/2018 at 12:30 PM #70867
I found this strategy from below website, made some minor modification, and add a MA filter, 240 per unit to simulate a daily MA.
https://www.babypips.com/trading/system-short-term-bollinger-reversion-180426
Walk forward by MA filter, stop loss and target profit screen capture attached.
Please enjoy and comment.
Bollinger Reversion Strategy123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189// Bollinger Reversion Strategy// Market: USD-JPY// Time Frame: 1 Hour// Time Zone: Any// Spread: 2// Original Idea from below website// https://www.babypips.com/trading/system-short-term-bollinger-reversion-180426defparam preloadbars = 5000defparam cumulateorders = True// no MM Position SizeOnce noMMPositionSizeLong = 1Once noMMPositionSizeShort = 1// Optional Function ( 1 = Enable 0 = Disable )BollingerMiddleExit = 1BollingerUpDownExit = 0MAFilter = 1MaxStopLoss = 1MaxTargetProfit = 1MoneyManagement = 0// Main Indicators Parameters SetupOnce BollingerMAPeriods = 50 // Not OptimizeOnce RSIPeriods = 9 // Not Optimize// Optional Function Parameters Setup// MA FilterIf MAFilter thenOnce MAFilterPeriods = 1680 // Variables Optimized, Range: 240-2400 Step: 240TrendMA = Average[MAFilterPeriods](close)LongMAFilter = Close > TrendMAShortMAFilter = Close < TrendMAEndif// 1) MaxStopLoss SettingIf MaxStopLoss then//LongONCE stopLossLong = 1.4 // by %, Variables Optimized//ShortONCE stopLossShort = 1 // by %, Variables OptimizedEndif//2) Target Profit SettingIf MaxTargetProfit then//LongONCE takeProfitLong = 1.2 // by %, Variables Optimized//ShortONCE takeProfitShort = 1 // by %, Variables OptimizedEndif// Money ManagementIf MoneyManagement thenOnce StartPositionSize = 1Once Size = StartPositionSizeOnce InitialCapital = (100000*Size)Once LastBalance = 0Equity = InitialCapital + LastBalance + StrategyProfitOnce MaxPosition = 100Once StepX = InitialCapital * 1For TimesX = 1 to MaxPosition DoIf Equity >= StepX * TimesX thenPositionSize = Size * TimesXElsIf Equity <= InitialCapital thenPositionSize = StartPositionSizeendifNextPositionSizeLong = PositionSizePositionSizeShort = PositionSize// Fuse SystemOnce CloseBalanceMaxDrop = 50If equity<QuickLevel thenQuitEndifRecordHighest = MAX(RecordHighest,Equity)QuickLevel = RecordHighest*((100-CloseBalanceMaxDrop)/100)Endif//Core IndicatorMyBollingerUpBand = BollingerUp[BollingerMAPeriods](close)MyBollingerLowBand = BollingerDown[BollingerMAPeriods](close)MyBollingerMidBand = Average[BollingerMAPeriods](close)MyRSILong = RSI[RSIPeriods](close)MyRSIShort = RSI[RSIPeriods](close)//Long SetupLongCondition1 = Close < OpenLongCondition2 = Low < MyBollingerLowBandLongCondition3 = Close > MyBollingerLowBandLongCondition4 = High < MyBollingerMidBandLongCondition5 = MyRSILong < 30 // Not OptimizeLongSignal = LongCondition1 and LongCondition2 and LongCondition3 and LongCondition4 and LongCondition5//Short SetupShortCondition1 = Open > CloseShortCondition2 = High > MyBollingerUpBandShortCondition3 = Close < MyBollingerUpBandShortCondition4 = Low > MyBollingerMidBandShortCondition5 = MyRSIShort > 70 // Not OptimizeShortSignal = ShortCondition1 and ShortCondition2 and ShortCondition3 and ShortCondition4 and ShortCondition5//Trading ActionGoLong = LongSignalGoShort = ShortSignalIf MAFilter thenGoLong = LongSignal and LongMAFilterGoShort = ShortSignal and ShortMAFilterEndif//Long EntryIf GoLong thenIf MoneyManagement thenBuy PositionSizeLong Contract at MarketElseBuy noMMPositionSizeLong Contract at MarketEndifIf MaxStopLoss thenStopLoss = StopLossLongEndifIf MaxTargetProfit thenTakeProfit = TakeProfitLongEndifEndif//Short entryIf GoShort thenIf MoneyManagement thenSellShort PositionSizeShort Contract at MarketElseSellShort noMMPositionSizeShort Contract at MarketEndifIf MaxStopLoss thenStopLoss = StopLossShortEndifIf MaxTargetProfit thenTakeProfit = TakeProfitShortEndifEndif// Bollinger Middle ExitIf BollingerMiddleExit thenIf LongonMarket and Close > MyBollingerMidBand thenSell at MarketEndifIf ShortonMarket and Close < MyBollingerMidBand thenExitShort at MarketEndifEndif// Bollinger Up Down ExitIf BollingerUpDownExit thenIf LongonMarket and Close > MyBollingerUpBand thenSell at MarketEndifIf ShortonMarket and Close < MyBollingerLowBand thenExitShort at MarketEndifEndif// Stop LossIf MaxStopLoss thenSet Stop %Loss StopLossEndif// Target ProfitIf MaxTargetProfit thenSet Target %Profit TakeProfitEndif, please enjoy and comment.
05/19/2018 at 12:55 PM #7087105/19/2018 at 4:15 PM #7089005/19/2018 at 4:43 PM #70892only consideration is few trade
Unfortunately this is quite often the way. Some of the best strategies place very few trades – but good trades, unfortunately the lack of trades makes them tough to test for robustness. A portfolio of many strategies that place few trades but good trades is a desirable thing to have but achieving this can be difficult due to the time required to prove robustness on this type of strategy. Also lots of strategies means the potential of lots of positions open at the same time so a big bank is needed to avoid ruin in this scenario.
Sometimes it just seems easier to buy an ETF and open a beer and just get on with life!
05/19/2018 at 4:50 PM #7089306/24/2018 at 4:43 PM #74254Hi Bin
Thanks for sharing I like this strategy much! This one is pretty similar as my trading habit as I always look for the opportunities of BB reversal.
Apart from RSI, Stochastic is one of my favorite indicator combining with BB for determining a reversal e.g. <20 go long, >80 go short. Could be a good filter maybe : P
Best
Hang
06/27/2018 at 1:28 PM #74537 -
AuthorPosts
Find exclusive trading pro-tools on