Problem with “Trading the strategy profit curve”

Viewing 6 posts - 16 through 21 (of 21 total)
  • Author
    Posts
  • #168600 quote
    robertogozzi
    Moderator
    Master

    I have no further solutions.

    #174911 quote
    Link
    Participant
    Senior

     

    //Condiciones de posicion
    CONDBUY = CondBuy1 and CondBuy2 and c1 and c2 and c3 and CtimeA and Tradeon and TradeON1 and TradeON2 and TradeON3 and Not Onmarket
    
    ONCE equitycurve = 0
    curveperiod = 17280
    once mydays = 1
    once olddate = 0
     
    //indicators
    equitycurve = average[curveperiod](strategyprofit)
    ONCE TradeON3 = 1
    IF StrategyProfit CROSSES UNDER equitycurve THEN
    TradeON3 = 0
    ENDIF
    
    IF StrategyProfit CROSSES OVER equitycurve THEN
    TradeON3 = 1
    ENDIF
    
    //mydays variable incrementing to let the average curve build over time
    if date > olddate then
    mydays=mydays+1
    olddate = date
    endif
    
    GRAPH equitycurve coloured(255,0,0) as "equity curve"
    GRAPH strategyprofit as "strategy profit"
    
    //Tamaño, Profit y Stop de la posicion
    IF CONDBUY and Strategyprofit <= 80000 AND mydays<curveperiod THEN
    ONCE Positionsize = 1
    buy positionsize contract at market
    SET TARGET %PROFIT 2.1
    SET STOP %LOSS 1.6
    ENDIF
    IF CONDBUY and Strategyprofit <= 80000 AND strategyprofit>=equitycurve AND mydays>curveperiod THEN
    ONCE Positionsize = 1
    buy positionsize contract at market
    SET TARGET %PROFIT 2.1
    SET STOP %LOSS 1.6
    ENDIF
    
    
    I have entered the code so that when strategyprofit crosses below equitycurve trades are paused.
    
    But what it does is stop operating.
    
    I need code so that when strategyprofit crosses again above equitycurve it will trade again.
    
    Thanks.
    
    
    
    
    
    
    Screenshot_1.png Screenshot_1.png
    #174915 quote
    Link
    Participant
    Senior

    The traductors 🙁

    #174918 quote
    robertogozzi
    Moderator
    Master

    I don’t know what translator you are using, but you are the only one who ALWAYS posts text this way. I often use translators, but this mess doesn’t happen. Please remove embedded HTML codes, before posting.
    You’ve already been answered, Once you have paused a strategy because STRATEGYPROFIT crosses UNDER the equity curve, there’s no way to cross above again as no further trades are allowed.
    You can only time the PAUSE, so that the PAUSE expitres after N bars or the next day, or when there is a new highest HIGH or lowest LOW, etc… THe equity curve will stay flat until you start trading again!

    #174930 quote
    Link
    Participant
    Senior

    To Big problems Big Solutions!

     

    🙂

    #175823 quote
    Link
    Participant
    Senior
    What tools can be used to draw an equity curve ???
Viewing 6 posts - 16 through 21 (of 21 total)
  • You must be logged in to reply to this topic.

Problem with “Trading the strategy profit curve”


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Link @tony-manero Participant
Summary

This topic contains 20 replies,
has 3 voices, and was last updated by Link
4 years, 6 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/02/2021
Status: Active
Attachments: 4 files
Logo Logo
Loading...