DOW J. Day Only Long

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #137742 quote

    Daily strategy with indicator created by Vonasi.
    The strategy was optimized with the tick by tick mode until December 2017.
    I put the usual monthly stop to not increase the Drawdown.

     

    ////////    DOW J. Day Only Long indicator by Vonasi    ////////////
    
    DEFPARAM CumulateOrders = False
    c30 =TR(close)>30
    indicator11 = ADX[10]
    indicator21 = ADXR[13]
    c2 = (indicator11[1] > indicator21[1])
    indicator1 = CALL "Average Penetration Histog."[55, 95](close)
    c1 = (indicator1 >= 1)
    If longonmarket and (barindex-tradeindex)>=22 then
    SELL AT MARKET
    ENDIF
    LossMonth  =450
    once StopMonth=1
    IF Month <> Month[1] THEN
    ProfitMonth=strategyprofit
    StopMonth=1
    endif
    If strategyprofit<=ProfitMonth-LossMonth then
    StopMonth=0
    endif
    IF not longonmarket and StopMonth=1 and c1 and c2 and c30  then
    BUY 1 CONTRACT AT MARKET
    SET STOP %LOSS 1.5
    ENDIF
    indicator2 = CALL "Average Penetration Histog."[55, 95](close)
    c2 = (indicator2 <= -1)
    IF c2 THEN
    SELL AT MARKET
    ENDIF
    Trailinglong     = 4* averagetruerange[1](close)
    Trailingsteplong = 1* averagetruerange[1](close)
    TGL = Trailinglong
    STPL = Trailingsteplong
    if not onmarket then
    MAXPRICE = 0
    PREZZOUSCITA = 0
    ENDIF
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close)
    if MAXPRICE-tradeprice(1)>=TGL then
    PREZZOUSCITA = MAXPRICE-STPL
    ENDIF
    ENDIF
    if onmarket and PREZZOUSCITA>0 then
    EXITSHORT AT PREZZOUSCITA STOP
    SELL AT PREZZOUSCITA STOP
    ENDIF
    thanked this post
    Dow-J.-Day-Only-Long.png Dow-J.-Day-Only-Long.png Dow-J.-Day-Only-Long-a.png Dow-J.-Day-Only-Long-a.png Dow-J.-Day-Only-Long-b.png Dow-J.-Day-Only-Long-b.png Strategy-SR-Dow-J.-Day-1.itf
    #137766 quote
    An error occurred in the previous version .... I entered the wrong file.
    
    
    
    
    ////////    DOW J. Day Only Long indicator by Vonasi    ////////////
    
    DEFPARAM CumulateOrders = False
    c30 =TR(close)>30
    indicator11 = ADX[10]
    indicator21 = ADXR[13]
    c2 = (indicator11[1] > indicator21[1])
    indicator1 = CALL "Average Penetration Histog."[55, 95](close)
    c1 = (indicator1 >= 1)
    If longonmarket and (barindex-tradeindex)>=22 then
    SELL AT MARKET
    ENDIF
    LossMonth  =450
    once StopMonth=1
    IF Month <> Month[1] THEN
    ProfitMonth=strategyprofit
    StopMonth=1
    endif
    If strategyprofit<=ProfitMonth-LossMonth then
    StopMonth=0
    endif
    IF not longonmarket and StopMonth=1 and c1 and c2 and c30  then
    BUY 1 CONTRACT AT MARKET
    SET STOP %LOSS 1.5
    ENDIF
    indicator2 = CALL "Average Penetration Histog."[55, 95](close)
    c3 = (indicator2 <= -1)
    IF c3 THEN
    SELL AT MARKET
    ENDIF
    Trailinglong     = 4* averagetruerange[1](close)
    Trailingsteplong = 1* averagetruerange[1](close)
    TGL = Trailinglong
    STPL = Trailingsteplong
    if not onmarket then
    MAXPRICE = 0
    PREZZOUSCITA = 0
    ENDIF
    if longonmarket then
    MAXPRICE = MAX(MAXPRICE,close)
    if MAXPRICE-tradeprice(1)>=TGL then
    PREZZOUSCITA = MAXPRICE-STPL
    ENDIF
    ENDIF
    if onmarket and PREZZOUSCITA>0 then
    EXITSHORT AT PREZZOUSCITA STOP
    SELL AT PREZZOUSCITA STOP
    ENDIF
    
    DOW-J.-Day-Only-Long.itf
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

DOW J. Day Only Long


ProOrder: Automated Strategies & Backtesting

New Reply
Author
Summary

This topic contains 1 reply,
has 1 voice, and was last updated by Mauro T. “Algorithm System”
5 years, 8 months ago.

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