Candlestick Scalper 1s discussion

Viewing 15 posts - 106 through 120 (of 172 total)
  • Author
    Posts
  • #142271 quote
    javi cano
    Participant
    Junior

    @GraHal , can you post .itf?

    #142276 quote
    GraHal
    Participant
    Master

    @GraHal , can you post .itf?

    This has been in my 4Test folder since April 20 awaiting Forward Test.

    So all results attached are Out of Sample.

    I did not re-optimise or tweak the .itf since April … here are backtest results on 1 sec TF.

    Good on 30 sec also?

    Spread = 4 on attached.

    Please post improvements?

    Mak.jpg Mak.jpg Mak2.jpg Mak2.jpg Mak3.jpg Mak3.jpg Mak4.jpg Mak4.jpg
    #142292 quote
    GraHal
    Participant
    Master

    Doh I forgot the .itf … that was the whole point of posting! 🙂

    Makside-DJI-S1.itf
    #142363 quote
    Philstrading
    Participant
    Senior

    Well I just downloaded that. I’ve found it difficult to test seconds charts due ot their limited ability to backtest any reasonable period and have ventured to the minutes world for scalping.

    Are there forward testing results since April for this?

    I’ll stick it on a demo anyway for a few months and see and peruse the code.

    winnie37 thanked this post
    #142378 quote
    GraHal
    Participant
    Master

    Are there forward testing results since April for this?

    No it was in my folder to be tested but I have no space due to the limit of 25 on running Systems in Demo!

    I have another 146 Systems to be tested!

    IG didn’t think it through when they culled / closed  our Test Bed Accounts earlier in 2020!?

    I’m sure IG must be losing out as a result … I might have lots of the 146 Systems (waiting to be tested) trading Live by now and so IG would be making spread revenue?

    #142382 quote
    Philstrading
    Participant
    Senior

    OK, yes it is limiting, but guess server bandwidth an issue for them as well. I’ve put it up on demo, quick glance dont think it had bearish code to take a trade bearish but had it to exit, but I’ll take another peek – I like to leave new ideas to weekend and tweak them intermittently.

    I did have a full house on demo with some combinations but now just running a few and forwarding testing some minimally on live.

    I can put up 15 or so and leave myself some room if you wanted some extra tested.

    My most recent is 5 and 7 mins eurusd which can do about 50% a year based on margin requirement limitations in backtesting running 45 mins in a.m. Not related to this topic so won’t post pic here.

    I’ll review next weekend most probably if it runs Ok over the week or if I need a distraction.. 🙂

    GraHal thanked this post
    #142414 quote
    GraHal
    Participant
    Master

    if you wanted some extra tested.

    Here is a minute version, if you Forward Test then I will stop the 1 sec and 1 min versions I set going on Test from this morning … that gives me 2 more spaces.

    The 1 sec and 1 min don’t take many trades, so maybe you can report back on performance monthly-ish … whenever suits you?

    It be great if you can get 1 sec and / or 1 min to work good on Shorts also?

    Thank You

    PS
    If anybody else comes up with improvements and / or more trades then let us know please.

    I guess reducing ‘>= 17’ in below will give more trades … I only just spotted it, else I would have tried previously.

    c21m = abs(close-open) >= 17

     

    //-------------------------------------------------------------------------
    // Main code : Makside DJI M1 v1
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Code principal : CANDLE
    //-------------------------------------------------------------------------
    Defparam cumulateorders = false
     
    n = 1
     
    timeframe(15 minute,updateonclose)
    c160m = open > open[1] and close > close[1] and close > open
     
     
    timeframe(1 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 Close crosses over Supertrend[12,4] then
    BUY N contracts at market
    set stop ploss 300
    ENDIF
     
    //if Summation[A29](Open - Close) > B29 then
    //sell at market
    //endif
     
    //************************************************************************
    //trailing stop function
    trailingstart = 28 //A35 //19 //trailing will start @trailinstart points profit
    trailingstep = 14 //A36 // 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
    
    #142415 quote
    GraHal
    Participant
    Master

    Ha I couldn’t resist!

    You can use below and still get 100% wins and loads more trades!  See Top equity curve!

    Why hasn’t this version been exalted on this Thread before??

    We need to get the Shorts working without reducing profit on Longs??

    And all the time this has been hiding in my 4Test folder … if only IG would give us unlimited on Demo!?

    Please would somebody test above full code over 200K bars and then use the condition below so to show 2 equity curves over 200k bars??  

    c21m = abs(close-open) >= 2
    winnie37 thanked this post
    Mak6.jpg Mak6.jpg Mak5.jpg Mak5.jpg
    #142419 quote
    GraHal
    Participant
    Master

    Its the same on 1 sec so that condition may be superfluous, but it’s worth leaving it in as it may be critical on other timeframes!

    Would be great if we could have the 1 sec over 200k bars also … some kind soul?? 🙂

    c21m = abs(close-open) >= 1
    bertrandpinoy and VinzentVega thanked this post
    Mak7.jpg Mak7.jpg Mak8.jpg Mak8.jpg
    #142425 quote
    Philstrading
    Participant
    Senior

    So I use other timeframes differently sometimes, but  I assumed you just are changing the 1 minute code to 1 second and changing the cm21 to 1

    I’ve put up the 1 minute and 1 seconds and also the 1 minute running on the 1 seconds as can produce different results historically. Just adding a bit of random chaos.. )

    So they are up and running now..

    Grahal.jpg Grahal.jpg
    #142427 quote
    Philstrading
    Participant
    Senior

    I’ll add the 2 at peak times and see how it varies as well – sometimes most profits can be gained during specific times with less trading exposure

    #142429 quote
    Léo
    Participant
    Average

    Hi Grahal,

    I am happy to backtest on 200 K bares – can you post the itf files you want me to test (and precise any specifics you need, ie TF, tick by tick, walf forward, etc) ?

    Also I have some space on my demo account for more strategies if needed.

    Alex

    #142430 quote
    Philstrading
    Participant
    Senior

    Also I had a notion to add another filter I found useful before just to see, so running a volume check so I’ve got various combinations running, and will see how the timed varies.. however historically this won’t start running till tomorrow, but will see – dont ask me why, I’ve brought it to their attention..

    bertrandpinoy thanked this post
    Grahal-2.jpg Grahal-2.jpg
    #142438 quote
    Philstrading
    Participant
    Senior

    So backtesting might depend on risk tolerance. Tested back to Feb on £1 per point using a volume filter and timed was a significant reduction in trades but gave 100% at 40% gain approx since feb on £1 per pip per £1K.

    On 1 mins with 100% success since Feb for the timed it gave a little over 80% per £1 per pip per £1K.

    Running all combinations on demo currently..

    For me it would depend on account size, risk tolerance etc.. Apparently data is increasing this year from 200K to 999K but we don’t have that yet, a longer test is preferable.

    For me trading less at 100% may be preferable for smaller accounts especially to keep risk down… Larger accounts not so bad, also risking 200p pips has more stopouts but 10% less risk per £1K per £1 point and not too much difference in outcome…

    I also backtested without overnight trades and it was much better with only 2 losses since february reducing losses by 5. On a smaller account it would have had a large intial drawdoown but no drawdowns on the peak times trading timing.. Below is th eno overnight trades if your account tolerance permits it.. but of course you can trade DJI at 20p so less of an issue on lesse amount but reducing profits accordingly..

    //-------------------------------------------------------------------------
    // Main code : Grahal 1 second test DJI timed
    //-------------------------------------------------------------------------
    Defparam cumulateorders = false
    td1         = 1 AND OpenDayOfWeek = 1 AND OpenTime >= 070000 AND OpenTime <= 205500  //Monday
    td2         = 1 AND OpenDayOfWeek = 2 AND OpenTime >= 070000 AND OpenTime <= 205500  //Tuesday
    td3         = 1 AND OpenDayOfWeek = 3 AND OpenTime >= 070000 AND OpenTime <= 205500  //Wednesday
    td4         = 1 AND OpenDayOfWeek = 4 AND OpenTime >= 070000 AND OpenTime <= 205500  //Thursday
    td5         = 1 AND OpenDayOfWeek = 5 AND OpenTime >= 070000 AND OpenTime <= 205500 //Friday
    
    
    tdCond      = td1 OR td2 OR td3 OR td4 OR td5 
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Code principal : CANDLE
    //-------------------------------------------------------------------------
    
    n = 1
     
    timeframe(15 minute,updateonclose)
    c160m = open > open[1] and close > close[1] and close > open
     
     
    timeframe(1 minute,updateonclose)
    c11m = open > open[1] and close > close[1]
    c21m = abs(close-open) >= 1
    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 Close crosses over Supertrend[12,4] and tdcond then
    BUY N contracts at market
    set stop ploss 300
    ENDIF
     
    //if Summation[A29](Open - Close) > B29 then
    //sell at market
    //endif
     
    //************************************************************************
    //trailing stop function
    trailingstart = 28 //A35 //19 //trailing will start @trailinstart points profit
    trailingstep = 14 //A36 // 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
     
    //stop order to exit the positions
    IF newSL>0 THEN
    SELL AT newSL STOP
    EXITSHORT AT newSL STOP
    ENDIF
    
    Grahal-1-minute-timed-no-vol.jpg Grahal-1-minute-timed-no-vol.jpg Grahal-1min-untimed.jpg Grahal-1min-untimed.jpg Grahal-no-overnight.jpg Grahal-no-overnight.jpg
    #142469 quote
    Philstrading
    Participant
    Senior

    No overnight mod

    Trail optimisation below. 20 trail is better but retains losses.

    15 trailstart  with 7 step gives improved results reducing stopouts to 1

    I’ll have a peek at a few more mods and see if they improve anything.

    // Main code : Grahal 1 min test code timed
    //-------------------------------------------------------------------------
    Defparam cumulateorders = false
    td1         = 1 AND OpenDayOfWeek = 1 AND OpenTime >= 070000 AND OpenTime <= 205500  //Monday
    td2         = 1 AND OpenDayOfWeek = 2 AND OpenTime >= 070000 AND OpenTime <= 205500  //Tuesday
    td3         = 1 AND OpenDayOfWeek = 3 AND OpenTime >= 070000 AND OpenTime <= 205500  //Wednesday
    td4         = 1 AND OpenDayOfWeek = 4 AND OpenTime >= 070000 AND OpenTime <= 205500  //Thursday
    td5         = 1 AND OpenDayOfWeek = 5 AND OpenTime >= 070000 AND OpenTime <= 205500 //Friday
    
    
    tdCond      = td1 OR td2 OR td3 OR td4 OR td5
    //-------------------------------------------------------------------------
    //-------------------------------------------------------------------------
    // Code principal : CANDLE
    //-------------------------------------------------------------------------
    
    n = 1
     
    timeframe(15 minute,updateonclose)
    c160m = open > open[1] and close > close[1] and close > open
     
     
    timeframe(1 minute,updateonclose)
    c11m = open > open[1] and close > close[1]
    c21m = abs(close-open) >= 2
    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 Close crosses over Supertrend[12,4] and tdcond then
    BUY N contracts at market
    set stop ploss 300
    ENDIF
     
    //if Summation[A29](Open - Close) > B29 then
    //sell at market
    //endif
     
    //************************************************************************
    //trailing stop function
    trailingstart = 15 //A35 //19 //trailing will start @trailinstart points profit
    trailingstep = 7 //A36 // 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
    bertrandpinoy and winnie37 thanked this post
    Grahal-no-overnight2.jpg Grahal-no-overnight2.jpg
Viewing 15 posts - 106 through 120 (of 172 total)
  • You must be logged in to reply to this topic.

Candlestick Scalper 1s discussion


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
MAKSIDE @makside Participant
Summary

This topic contains 171 replies,
has 16 voices, and was last updated by CMM
3 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/07/2020
Status: Active
Attachments: 62 files
Logo Logo
Loading...