ScalpMaster 10S

Viewing 15 posts - 46 through 60 (of 67 total)
  • Author
    Posts
  • #141404 quote
    GraHal
    Participant
    Master

    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? 🙂

    #141406 quote
    deletedaccount051022
    Participant
    New
    //-------------------------------------------------------------------------
    // Codice principale : 1secondo
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Code principal : CANDLE
    //-------------------------------------------------------------------------
    Defparam cumulateorders = false
     
    n = 10
    
    //Conditions to enter long positions
    TIMEFRAME(24 minutes,updateonclose)
    Period= 22 //optimize
    inner = 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] //optimize
    tc3 = (close > indicator101)
    //tc4 = (close < indicator101)
    
    ma = average[40,4](close) //optimize
    tc11 = ma > ma[1]
    //tc12 = ma < ma[1]
     
    timeframe(10 minute,updateonclose)
    c160m = open > open[1] and close > close[1] and close > open
     
     
    timeframe(2 minute,updateonclose)
    c11m = open > open[1] and close > close[1]
    c21m = abs(close-open) >= 17
    c31m = abs(close[1]-open[1])
    c41m = c31m > c21m
     
    timeframe(default)
    c1def = open > open[1] and close > close[1]
    c2def = abs(close-open) >= 1
     
    IF not longonmarket and c1def and c11m and c21m and c41m and c2def and c1def and c160m AND tc1 AND tc3 AND tc11 then
    BUY N contracts at market
    set stop ploss 300
    ENDIF
     
    //if longonmarket and close crosses under st then
    //sell at market
    //endif
     
    //************************************************************************
    //trailing stop function
    trailingstart = 19 //trailing will start @trailinstart points profit
    trailingstep = 7 //trailing step to move the "stoploss"
     
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
     
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
    newSL = tradeprice(1)+trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    ENDIF
    ENDIF
     
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
    newSL = tradeprice(1)-trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    ENDIF
    ENDIF
     
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
    //***
    
    #141407 quote
    deletedaccount051022
    Participant
    New

    This code yields the following results

    DAX-Scalp-v2.png DAX-Scalp-v2.png
    #141409 quote
    deletedaccount051022
    Participant
    New

    This is a combination of ideas posted by various helpful people (nonetheless, GraHal, Nicolas to name but a few)

    #141413 quote
    Francesco
    Participant
    Veteran

    That looks highly optimized to me, anyway i think it’s a MAKSIDE code idea.

    #141415 quote
    deletedaccount051022
    Participant
    New

    You tell us – it’s your code just with a higher time frame filter added…

    #141418 quote
    Francesco
    Participant
    Veteran

    As i told you it’s not my code, take a look here: https://www.prorealcode.com/topic/candlestick-scalper-1s-discussion/

    #141426 quote
    Roger
    Participant
    Veteran

    Attached is the 200 k backtest

    CapturePRT.jpg CapturePRT.jpg
    #141430 quote
    GraHal
    Participant
    Master

    Out 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!

    Sam.jpg Sam.jpg Sam-2.jpg Sam-2.jpg
    #141433 quote
    GraHal
    Participant
    Master

    To save any confusion …

    My results on DJI are with position Size = 1.

    samsampop results on DAX are with position size = 10.

    thanked this post
    #141438 quote
    deletedaccount051022
    Participant
    New

    Apologies Francesco, thanks for clarifying

    #141446 quote
    deletedaccount051022
    Participant
    New

    Morning – 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.

    #141447 quote
    deletedaccount051022
    Participant
    New
    //-------------------------------------------------------------------------
    // Codice principale : 1secondo
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Code principal : CANDLE
    //-------------------------------------------------------------------------
    Defparam cumulateorders = false
     
    n =5
     
    timeframe(10 minute,updateonclose)
    c160m = open > open[1] and close > close[1] and close > open
    sc1 =  open < open[1] and close < close[1] and close < open
     
    timeframe(2 minute,updateonclose)
    c11m = open > open[1] and close > close[1]
    c21m = abs(close-open) >= 17
    c31m = abs(close[1]-open[1])
    c41m = c31m > c21m
    
    sc2 = open < open[1] and close < close[1]
    sc3 = abs(close-open) <= 17  //see below
    sc4 = abs(close[1]-open[1])  //these may need to be same as bove, and sc5 stays <
    sc5 = sc3 < sc4
     
    timeframe(default)
    c1def = open > open[1] and close > close[1]
    c2def = abs(close-open) >= 1
     
    sc6 = open < open[1] and close < close[1]
    sc7 = abs(open-close) <= 1 
     
    IF not longonmarket and c1def and c11m and c21m and c41m and c2def and c1def and c160m then
    BUY N contracts at market
    set stop ploss 300
    ENDIF
     
    //manage long positions
    IF LONGONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND close-tradeprice(1)>=trailingstart*pipsize THEN
    newSL = tradeprice(1)+trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND close-newSL>=trailingstep*pipsize THEN
    newSL = newSL+trailingstep*pipsize
    ENDIF
    ENDIF
    
    IF not shortonmarket and sc1 and sc2 and sc3 and sc4 and sc5 and sc6 and sc7 then
    SELLSHORT N contracts at market
    set stop ploss 300
    ENDIF 
    
    //manage short positions
    IF SHORTONMARKET THEN
    //first move (breakeven)
    IF newSL=0 AND tradeprice(1)-close>=trailingstart*pipsize THEN
    newSL = tradeprice(1)-trailingstep*pipsize
    ENDIF
    //next moves
    IF newSL>0 AND newSL-close>=trailingstep*pipsize THEN
    newSL = newSL-trailingstep*pipsize
    ENDIF
    ENDIF
    
    //if longonmarket and close crosses under st then
    //sell at market
    //endif
     
    //************************************************************************
    //trailing stop function
    trailingstart = 19 //trailing will start @trailinstart points profit
    trailingstep = 7 //trailing step to move the "stoploss"
     
    //reset the stoploss value
    IF NOT ONMARKET THEN
    newSL=0
    ENDIF
     
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
    //***
    
    GraHal thanked this post
    #141450 quote
    deletedaccount051022
    Participant
    New

    I’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.

    boonet thanked this post
    DAX-Scalp-Summary.png DAX-Scalp-Summary.png DAX-Scalp-Equity-Curve.png DAX-Scalp-Equity-Curve.png
    #141456 quote
    deletedaccount051022
    Participant
    New

    I 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?

    boonet thanked this post
Viewing 15 posts - 46 through 60 (of 67 total)
  • You must be logged in to reply to this topic.

ScalpMaster 10S


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 66 replies,
has 14 voices, and was last updated by javi cano
5 years, 5 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/01/2020
Status: Active
Attachments: 30 files
Logo Logo
Loading...