NAS 2m HULL-SAR trading system

Viewing 15 posts - 61 through 75 (of 344 total)
  • Author
    Posts
  • #147986 quote
    VinzentVega
    Participant
    Veteran

    Nasdaq has a minimum position of 1.

    No, 0.5 ist also possible. Maybe 0.5 is the smallest unit

    josef1604 thanked this post
    #147993 quote
    nonetheless
    Participant
    Master

    It used positionprice[1] and when there’s no market position and opened a new one it went off the rails.

    I ran some quick tests and using positionprice[0] definitely works better with the sensitivity settings and is more consistent with Roberto’s mod.

    Strangely though, with ts2sensitivity = 0, I’m seeing better performance using positionprice[1] … which doesn’t really make sense. I’ll do some more tests with other algos.

    josef1604 thanked this post
    #147994 quote
    nonetheless
    Participant
    Master

    If I set custom trading hours in PRT that matches the exchange, for Nasdaq UTC-4. I just set the regular trading hours (9:30-16:00) in the script?

    Not sure how custom trading hours works tbh. I always run PRT on my computer time and then adjust the algos accordingly as different indices are optimal at different times.

    #147995 quote
    robertogozzi
    Moderator
    Master

    Bear in mind that positionprice[1] is NOT the average price before the last position accumulated, but the value that positionprice retained the previous bar. They may, or may not, be the same. They will different anytime a new position is added, otherwise they will be the same.

    It’s not equivalent to Dclose and Dclose(1) which will always differ.

    nonetheless thanked this post
    #147996 quote
    nonetheless
    Participant
    Master

    I keep seeing that he makes many entries in a row without closing the first ones. For that you have to have a large capital. I have also tried reducing the 0.4lotti, but it keeps coming in with 1lotti. Can you help me please? is there something that escapes me?

    This was designed to run with cumulativeorders=true so yes it will make more entries. If you don’t want that, you can change cumulativeorders=false or you can set MaxPositionsAllowed = 1*positionsize

    In demo mode the min position on US Tech 100 is 1, when running live min position is 0.5

    josef1604 thanked this post
    #147997 quote
    Paul
    Participant
    Master

    thnx for looking into it.

    If using positionprice[1] and sensitivity 0 or 1, you find in the detailed rapport a lot of very short trades of mainly 3 bars with a no cumulative orders algo.

    mmm it seems with your algo, using positionprice[0], you still have a lot off trades of 0 bars, but that must be a bug in the detailed rapport because of cumulative orders. Was mentioned somewhere?

    positionprice[1] works not (always) as it is supposed to, visible when using graphonprice newsl with sensitivity 0 or 1

    #148054 quote
    josef1604
    Participant
    Senior

     

    Thank you first. I knew about FLASE Y TRUE and it works well. But I have observed that if we put MaxPositionsAllowed = 1 * positionize it makes 2, if we put MaxPositionsAllowed = 2 * positionize it makes 3 at most … that is, it always makes one more as I see in the tests.

    Thanks for the work you do nonetheless

    #148082 quote
    nonetheless
    Participant
    Master

    You can change

    COUNTOFLONGSHARES <= MaxPositionsAllowed
    COUNTOFSHORTSHARES <= MaxPositionsAllowed

    to

    COUNTOFLONGSHARES < MaxPositionsAllowed
    COUNTOFSHORTSHARES < MaxPositionsAllowed
    josef1604 thanked this post
    #148103 quote
    nonetheless
    Participant
    Master

    variation on the 1m version for forward testing.

    boonet, swedshare, josef1604 and 6 others thanked this post
    #148132 quote
    josef1604
    Participant
    Senior

     

    Thanks @nonetheless I have learned something new. Thank you very much

    Now to try in demo the last version that you have uploaded today. Do you have it on real?

    #148137 quote
    swedshare
    Participant
    Senior

    Nonetheless, take a look at the entry conditions in v7.5. There should be SL and TP for the first position as well, not only for the additional, right?

    // Conditions to enter long positions
    IF not longonmarket and Ctime and c1 and c1a AND C3a and c3b and c3c AND C5a and c5b THEN
    BUY positionsize CONTRACT AT MARKET
    elsif longonmarket and Ctime and c1 and c1a and c3 and c3a and c5 and COUNTOFLONGSHARES < MaxPositionsAllowed then
    BUY positionsize CONTRACT AT MARKET
    SET STOP %LOSS 1.4
    SET TARGET %PROFIT 1.5
    ENDIF
    #148194 quote
    nonetheless
    Participant
    Master

    Hmm, I had assumed that the stop and target would apply to everything within that IF … ENDIF, but adding it again at line 4 does give a different result

    // Conditions to enter long positions
    IF not longonmarket and Ctime and c1 and c1a and c1b AND C3a and c3b and c3c AND C5a and c5b THEN
    BUY positionsize CONTRACT AT MARKET
    SET STOP %LOSS sl
    SET TARGET %PROFIT tp
    elsif longonmarket and Ctime and c1 and c1a and c3 and c3a and c5 and COUNTOFLONGSHARES < MaxPositionsAllowed then
    BUY positionsize CONTRACT AT MARKET
    SET STOP %LOSS sl
    SET TARGET %PROFIT tp
    ENDIF

    unfortunately though the result was slightly worse. I’m not sure which is technically correct but I think I’ll keep it the way it is for now. It seems to behave as expected in trading.

    josef1604 thanked this post
    #148324 quote
    Monochrome
    Participant
    Senior

    I added a default macd with no optimisation as an additional confirmation. Less  max profit but less drawdown and higher Avg profit/loss ratio.

    Only tested for 100k, i just cant get it to work on premium 200k. What instrument is it? dow jones industrial average? not working. If someone can advice me that’d be helpful.

    #148335 quote
    Paul
    Participant
    Master

    200k, the mod uses an addition that for each cumulative position, the trigger to activate the trailingstop get’s lower. Not sure If I leave it in or if this strategy is suited for that addition.

    if countoflongshares=0 or countofshortshares=0 then
    trailingpercentlong  = 0.35 // %
    trailingpercentshort = 0.38 // %
    endif
    if countoflongshares>0.2 then
    trailingpercentlong  = max(0.1,trailingpercentlong-(countoflongshares*0.02))
    endif
    if countofshortshares>0.2 then
    trailingpercentshort = max(0.1,trailingpercentshort-(countofshortshares*0.02))
    endif
    
    once accelerator     = 0.03 // 1 = default; always > 0 (i.e. 0.5-3)
    once accelerator2     = 0.1 // 1 = default; always > 0 (i.e. 0.5-3)
    once ts2sensitivity  = 0 // [0]close;[1]high/low;[2]low;high
    //====================
    once steppercentlong  = (trailingpercentlong/10)*accelerator
    once steppercentshort = (trailingpercentshort/10)*accelerator2
    if onmarket then
    trailingstartlong = positionprice[0]*(trailingpercentlong/100)
    trailingstartshort = positionprice[0]*(trailingpercentshort/100)
     
    trailingsteplong = positionprice[0]*(steppercentlong/100)
    trailingstepshort = positionprice[0]*(steppercentshort/100)
    endif
    #148392 quote
    Fab28
    Participant
    Senior

    Which variable must be modified to divide by 2 or by 3 the maximum losses of the NAS-1M-HULL-SAR-v7.5 strategy ?

Viewing 15 posts - 61 through 75 (of 344 total)
  • You must be logged in to reply to this topic.

NAS 2m HULL-SAR trading system


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 343 replies,
has 42 voices, and was last updated by bege
3 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/09/2020
Status: Active
Attachments: 129 files
Logo Logo
Loading...