RSI_BB_Long 5min trading strategy
Forums › ProRealTime English forum › ProOrder support › RSI_BB_Long 5min trading strategy
- This topic has 5 replies, 2 voices, and was last updated 8 years ago by Nicolas.
-
-
09/15/2016 at 9:29 AM #13114
My First code …
EUR/USD mini ,Timeframe 5 min
Only Long , and check RSI , Bollinger Band with reinvestm. profit
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455////// RSI_BB_LONG /////DEFPARAM CumulateOrders=FalseDEFPARAM FLATBefore = 083000DEFPARAM FLATAfter = 120000REINV = 1 // set-up 0 for not reinvest.levier = 5IF REINV = 0 THENn = levierENDIFIF REINV = 1 THEN // Reinvest capitalcapital = 2000 + strategyprofitn = (capital / 200) *levierENDIFif n > 30 thenn = 30endif// Variablec3 = Low < Bollingerdownc4 = Low[1] < Bollingerdownc6 = Close < Openc7 = Close[1] < Open[1]MM15 = ExponentialAverage[20](close)// Ranger1 = range[1] > rangec1 = RSI[10] < 30IF c1 and c3 and c4 and c6 and c7 and r1 and not ONMARKET THENBUY n SHARES AT High Stop//BUY 1 SHARES AT HIGH STOP//SET STOP %LOSS 0.8//SET TARGET $PROFIT 15ENDIFIF longonmarket and high > MM15 THENSELL AT MARKETENDIFSET STOP %LOSS 0.4and somenthing else
The Back test is good but only one year back
welcome your fdb
09/15/2016 at 9:35 AM #13116Hello JR1976,
Thanks for your contribution, I have moved your post from the Library pending list to the forum.
My test shows that the strategy isn’t so good before the last year. Did you include the spread in your backtests?
Your idea is good : taking long position while piercing the lowest bollinger band, but while it is very effective in ranging market (price revert to its mean), it is not the case in trending one, that’s the main reason I believe it doesn’t perform well before 2015.
09/15/2016 at 9:52 AM #1312109/15/2016 at 9:46 PM #13149HI Nicolas,
I’am checked there is an error in the code , because not start the levrier
This the rule correct
IF REINV = 1THEN // Reinvest capital
capital = 200 + strategyprofit
n = (capital / 200) *levier
ENDIFCould you please check If should be better before 2015 ?
09/16/2016 at 9:28 AM #13155HI ,
I tried to optimized the code to avoid the trend period … the new variable is to trade IF
c8 = dailyhigh > Dhigh(50)
dailyHigh = DHigh(1)Could you please backtest 2014 to complete the check ??
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950///// RSI_BB_LONG_Pr /////DEFPARAM CumulateOrders=FalseDEFPARAM FLATBefore = 083000DEFPARAM FLATAfter = 120000REINV = 1 // set-up 0 for not reinvest.levier = 2IF REINV = 0 THENn = levierENDIFIF REINV = 1 THEN // Reinvest capitalcapital = 200 + strategyprofitn = (capital / 150) *levierENDIFif n > 30 thenn = 30endif// Variablec1 = RSI[10] < 30c3 = Low < Bollingerdownc4 = Low[1] < Bollingerdownc6 = Close < Openc7 = Close[1] < Open[1]//newc8 = dailyhigh > Dhigh(50)dailyHigh = DHigh(1)MM15 = ExponentialAverage[20](close)//MM100 = ExponentialAverage[100](Dailyhigh)// Ranger1 = range[1] > rangeIF c1 and c3 and c4 and c6 and c7 and r1 and c8 and not ONMARKET THENBUY n SHARES AT High Stop//BUY 1 SHARES AT HIGH STOP//SET STOP %LOSS 0.8//SET TARGET $PROFIT 15ENDIFIF longonmarket and high > MM15 THENSELL AT MARKETENDIFSET STOP %LOSS 0.409/16/2016 at 11:02 AM #13159 -
AuthorPosts
Find exclusive trading pro-tools on