Volume & Donchian – Daily Break Out trade

Forums ProRealTime English forum ProOrder support Volume & Donchian – Daily Break Out trade

  • This topic has 1 reply, 1 voice, and was last updated 8 years ago by avatarPer.
Viewing 2 posts - 1 through 2 (of 2 total)
  • #15597
    Per

    Intro to the strategies which is based on my view of a Daily trend break out:

    1. The Close is > DonchianUp  (40 day )
    2. Volume > 1,5 Volume[20]
    3. Buy on the next day open.
    The strategy criteria is:
    • Duration – 4-5 monts
    • Ref. index – SPY, which shall be BULL ie. MA 65D > 195D
    • The instrument, shall be BULL i.e. MA 40D > 120D
     The target is based on a ATR based trailing stop loss that is optimize by the parameter optimization function (it varies from instrument to instrument as 5-8 x ATR).

    Here is the code:

    I ran a back-test on a NYSE stock (GOL LINHAS …) , with this outcome:

    The ProOrder order part (bellow t REM Trading target = Trailing Stop loss based on ATR) is  a challenge as it does not place trades.

    I have been reading the manual and seen lots of support on this site, while eventually seeking an advice so to progress with the development of this back testing script.

    Hoping for a positive reply.

     

    Best regards,

    Per Inge

    #15651
    Per

    I found the following money management setup, to which I will appreciate any comment to code enhancements:

    REM Trading target = Trailing Stop loss based on ATR a changing ATR
    myATR = averagetruerange[20]
    mySL = myATR * 5
    myBetSize = 1500*0.03 //3% loss,  unit of $1500 = $45
    myNoOStock = myBetSize/mySL //No of stocks at SL is = $45 (if ATR was fixed)
    myPosSize = myNoOStock * close //No. of stocks x close

    IF C1 AND C2 AND C3 THEN
    If myPosSize > 1500 THEN
    BUY 1500 CASH AT MARKET
    ELSIF myPosSize <= 1500 THEN
    BUY myPosSize CASH AT MARKET
    ELSE
    ENDIF
    ENDIF
    SET STOP TRAILING mySL

    The weakness is:

    • Small position at high ATR
    • Fluctuation of the ATR gives an innacurate SL

     

Viewing 2 posts - 1 through 2 (of 2 total)
Similar topics:

Create your free account now and post your request to benefit from the help of the community
Register or Login