ScalpMaster 10S
Forums › ProRealTime English forum › ProOrder support › ScalpMaster 10S
- This topic has 66 replies, 14 voices, and was last updated 5 years ago by
javi cano.
-
-
08/11/2020 at 2:47 PM #141404
Will keep you all posted.
Feel free to share as far as you have got … others may think of improvements you may not think of … then we all benefit? 🙂
08/11/2020 at 3:04 PM #1414061234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889//-------------------------------------------------------------------------// Codice principale : 1secondo//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Code principal : CANDLE//-------------------------------------------------------------------------Defparam cumulateorders = falsen = 10//Conditions to enter long positionsTIMEFRAME(24 minutes,updateonclose)Period= 22 //optimizeinner = 2*weightedaverage[round( Period/2)](typicalprice)-weightedaverage[Period](typicalprice)HULLa = weightedaverage[round(sqrt(Period))](inner)tc1 = HULLa > HULLa[1]//tc2 = HULLa < HULLa[1]indicator101 = SuperTrend[4,4] //optimizetc3 = (close > indicator101)//tc4 = (close < indicator101)ma = average[40,4](close) //optimizetc11 = ma > ma[1]//tc12 = ma < ma[1]timeframe(10 minute,updateonclose)c160m = open > open[1] and close > close[1] and close > opentimeframe(2 minute,updateonclose)c11m = open > open[1] and close > close[1]c21m = abs(close-open) >= 17c31m = abs(close[1]-open[1])c41m = c31m > c21mtimeframe(default)c1def = open > open[1] and close > close[1]c2def = abs(close-open) >= 1IF not longonmarket and c1def and c11m and c21m and c41m and c2def and c1def and c160m AND tc1 AND tc3 AND tc11 thenBUY N contracts at marketset stop ploss 300ENDIF//if longonmarket and close crosses under st then//sell at market//endif//************************************************************************//trailing stop functiontrailingstart = 19 //trailing will start @trailinstart points profittrailingstep = 7 //trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THENnewSL = tradeprice(1)-trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstep*pipsize THENnewSL = newSL-trailingstep*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF//***08/11/2020 at 3:05 PM #141407This code yields the following results
08/11/2020 at 3:07 PM #141409This is a combination of ideas posted by various helpful people (nonetheless, GraHal, Nicolas to name but a few)
08/11/2020 at 3:26 PM #14141308/11/2020 at 3:34 PM #141415You tell us – it’s your code just with a higher time frame filter added…
08/11/2020 at 4:17 PM #141418As i told you it’s not my code, take a look here: https://www.prorealcode.com/topic/candlestick-scalper-1s-discussion/
08/11/2020 at 6:18 PM #14142608/11/2020 at 8:19 PM #141430Out of interest I changed TF’s to M25, M10 and M5 and ran it on DJI on M1 TF with spread = 4.
Attached are results over 100K bars.
I have reservations about the MAE … on nearly every winning trade the MAE is Losing X multiples times the eventual Gain.
The MFE spends a lot of time way in excess of the eventual gain.
Maybe above means there is plenty of scope for improvement?
As you can see from the equity curve (gaps in positions) … the strategy (Long only) does stay out of the market during extended down periods … so that is good!
08/11/2020 at 8:54 PM #14143308/12/2020 at 7:03 AM #141438Apologies Francesco, thanks for clarifying
08/12/2020 at 8:15 AM #141446Morning – I have added a short entry criteria as well and re-ran the back test on 100k, to include the down turn in Feb-Mar of this year.
08/12/2020 at 8:15 AM #1414471234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586//-------------------------------------------------------------------------// Codice principale : 1secondo//-------------------------------------------------------------------------//-------------------------------------------------------------------------// Code principal : CANDLE//-------------------------------------------------------------------------Defparam cumulateorders = falsen =5timeframe(10 minute,updateonclose)c160m = open > open[1] and close > close[1] and close > opensc1 = open < open[1] and close < close[1] and close < opentimeframe(2 minute,updateonclose)c11m = open > open[1] and close > close[1]c21m = abs(close-open) >= 17c31m = abs(close[1]-open[1])c41m = c31m > c21msc2 = open < open[1] and close < close[1]sc3 = abs(close-open) <= 17 //see belowsc4 = abs(close[1]-open[1]) //these may need to be same as bove, and sc5 stays <sc5 = sc3 < sc4timeframe(default)c1def = open > open[1] and close > close[1]c2def = abs(close-open) >= 1sc6 = open < open[1] and close < close[1]sc7 = abs(open-close) <= 1IF not longonmarket and c1def and c11m and c21m and c41m and c2def and c1def and c160m thenBUY N contracts at marketset stop ploss 300ENDIF//manage long positionsIF LONGONMARKET THEN//first move (breakeven)IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close-newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIFIF not shortonmarket and sc1 and sc2 and sc3 and sc4 and sc5 and sc6 and sc7 thenSELLSHORT N contracts at marketset stop ploss 300ENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THENnewSL = tradeprice(1)-trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL-close>=trailingstep*pipsize THENnewSL = newSL-trailingstep*pipsizeENDIFENDIF//if longonmarket and close crosses under st then//sell at market//endif//************************************************************************//trailing stop functiontrailingstart = 19 //trailing will start @trailinstart points profittrailingstep = 7 //trailing step to move the "stoploss"//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF//***1 user thanked author for this post.
08/12/2020 at 8:18 AM #141450I’m running this on the DAX on a 2 min time frame. Initial Capital of 5,000 and trading 5 per point. I am using a Spread of 2, but may need to increase this as it trades around the clock.
1 user thanked author for this post.
08/12/2020 at 8:29 AM #141456I would still add a VDAX filter for this strategy, so that it didn’t trade if volatility on the DAX > than say 40. Anyone know how this can be achieved?
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on