SP500 M1 curve follower
Forums › ProRealTime English forum › ProOrder support › SP500 M1 curve follower
- This topic has 34 replies, 6 voices, and was last updated 2 years ago by phoentzs.
-
-
01/11/2022 at 11:09 AM #185089
I came across this little system from Juanj here and am falling a little bit off the beaten track. I optimized it to M1 200000bars for the SP500 and added an emergency stop. And then something comes out. Has anyone tried that? Sure, it’s almost always on the market. Do the over-night fees eat up the profit or can you trade something like that live? What do the old hands say?
@juanj: What do you think about it yourself?SP500 M112345678910111213141516171819202122232425262728293031323334///Spread set to 0.9 pointsdefparam preloadbars = 10000possize = 1pointsp = 15 //points where profit is to be locked in //20 SP500pointsb = 43 //points where stop is to be taken //36 SP500fast = average[11,4](close) //11medium = average[14,4](close) //13If countofposition = 0 thenIf fast > medium thenBUY possize CONTRACT AT open + averagetruerange[3](close)*2 stopEndIfEndIfIf longonmarket and close >= positionprice + pointsp thenIf close < close[1] thenSELL AT MARKETEndIfElsIf longonmarket and close <= positionprice - pointsb thenSELLSHORT possize*2 CONTRACT AT MARKETEndIfIf shortonmarket and close <= positionprice - pointsp thenIf close > close[1] thenEXITSHORT AT MARKETEndIfElsIf shortonmarket and close >= positionprice + pointsb thenBUY possize*2 CONTRACT AT MARKETEndIfSET TARGET pPROFIT 16 //50SET STOP %LOSS 1.101/11/2022 at 1:58 PM #18511201/11/2022 at 2:35 PM #185120Most likely the system will stop and every time you have to reactivate it as mentioned in the previous post, but it works well only in the optimized period
HelloMauro T.
01/11/2022 at 2:52 PM #18512501/11/2022 at 3:04 PM #185127Quickly rewritten to a fixed 5 * pip size … that should actually be enough. The picture is similar, only less time on the market.
SP500 M112345678910111213141516171819202122232425262728293031323334353637383940///Spread set to 0.9 pointsdefparam preloadbars = 10000possize = 5pointsp = 25 //points where profit is to be locked in //20 SP500pointsb = 45 //points where stop is to be taken //36 SP500fast = average[11,4](close) //11medium = average[14,4](close) //13//If countofposition = 0 then//If fast > medium then//BUY possize CONTRACT AT open + averagetruerange[3](close)*2 stop//EndIf//EndIfIf countofposition = 0 thenIf fast > medium thenBUY possize CONTRACT AT open + 5*pipsize stopEndIfEndIfIf longonmarket and close >= positionprice + pointsp thenIf close < close[1] thenSELL AT MARKETEndIfElsIf longonmarket and close <= positionprice - pointsb thenSELLSHORT possize*2 CONTRACT AT MARKETEndIfIf shortonmarket and close <= positionprice - pointsp thenIf close > close[1] thenEXITSHORT AT MARKETEndIfElsIf shortonmarket and close >= positionprice + pointsb thenBUY possize*2 CONTRACT AT MARKETEndIfSET TARGET pPROFIT 25 //50SET STOP %LOSS 1.201/11/2022 at 6:46 PM #18516601/11/2022 at 7:08 PM #185175The strategy didn’t come from me. The strategy is certainly not robust, rather something that you optimize every month. It cannot manage 1000000bars for the reason that it is calculated in pips. But a nice gimmick that maybe only needs a frame.
01/11/2022 at 11:08 PM #185203SnorreDK could you do a 1M Backtest on this one?
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647///Spread set to 0.9 pointsdefparam preloadbars = 10000possize = 5pointsp = 25 //points where profit is to be locked in //20 SP500pointsb = 45 //points where stop is to be taken //36 SP500fast = average[11,4](close) //11medium = average[14,4](close) //13TIMEFRAME (10 MINUTES, updateonclose)A = 26B = 8S = 1.3A1 = Average[A,B](low)A2 = Average[A*s,B](low)c3 = a1 > a2TIMEFRAME (default, UPDATEONCLOSE)//If countofposition = 0 then//If fast > medium then//BUY possize CONTRACT AT open + averagetruerange[3](close)*2 stop//EndIf//EndIfIf countofposition = 0 thenIf fast > medium and c3 thenBUY possize CONTRACT AT open + 5*pipsize stopEndIfEndIfIf longonmarket and close >= positionprice + pointsp thenIf close < close[1] thenSELL AT MARKETEndIfElsIf longonmarket and close <= positionprice - pointsb thenSELLSHORT possize*2 CONTRACT AT MARKETEndIfIf shortonmarket and close <= positionprice - pointsp thenIf close > close[1] thenEXITSHORT AT MARKETEndIfElsIf shortonmarket and close >= positionprice + pointsb thenBUY possize*2 CONTRACT AT MARKETEndIfSET TARGET pPROFIT 25 //50SET STOP %LOSS 1.201/11/2022 at 11:36 PM #18520701/12/2022 at 2:50 AM #18522301/12/2022 at 8:58 AM #185231what do you mean phoentzs ? its an else if command? so i do not need to insert it else where?
converted TP into % if SnorreDK could test to see if there is any diff in the performance this way
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647///Spread set to 0.9 pointsdefparam preloadbars = 10000possize = 5pointsp = 25 //points where profit is to be locked in //20 SP500pointsb = 45 //points where stop is to be taken //36 SP500fast = average[11,4](close) //11medium = average[14,4](close) //13TIMEFRAME (10 MINUTES, updateonclose)A = 26B = 8S = 1.3A1 = Average[A,B](low)A2 = Average[A*s,B](low)c3 = a1 > a2TIMEFRAME (default, UPDATEONCLOSE)//If countofposition = 0 then//If fast > medium then//BUY possize CONTRACT AT open + averagetruerange[3](close)*2 stop//EndIf//EndIfIf countofposition = 0 thenIf fast > medium and c3 thenBUY possize CONTRACT AT open + 5*pipsize stopEndIfEndIfIf longonmarket and close >= positionprice + pointsp thenIf close < close[1] thenSELL AT MARKETEndIfElsIf longonmarket and close <= positionprice - pointsb thenSELLSHORT possize*2 CONTRACT AT MARKETEndIfIf shortonmarket and close <= positionprice - pointsp thenIf close > close[1] thenEXITSHORT AT MARKETEndIfElsIf shortonmarket and close >= positionprice + pointsb thenBUY possize*2 CONTRACT AT MARKETEndIfSET TARGET %PROFIT 0.54SET STOP %LOSS 1.201/12/2022 at 9:57 AM #185234I’m still testing myself. In any case, lines 4-6 and the corresponding instructions in the code must be given as a percentage in order to be able to test further back in a practicable manner. In my opinion, C3 must also be included in lines 33-44. So that people only buy and sell in the respective direction. I believe.
01/12/2022 at 10:11 AM #18523601/12/2022 at 11:22 AM #185242@Robertogozzi: Could you please surround the values in%? Also those in the “IF” loop?
01/12/2022 at 11:34 AM #185243Which code are you referring to?
What do you mean by SURROUND?
Which IF block?
-
AuthorPosts
Find exclusive trading pro-tools on