informazioni sul take profit

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #233382 quote
    Antonio GarbinesiAntonio Garbinesi
    Participant
    Average

    buonasera avrei un dubbio, se io imposto un take profit al 10% e il mio sistema non cumula sono certo che dovo aver raggiunto il 10% di profit esce dalla posizione ,ma nel caso in cui cumuli e magari apre quattro cinque posizoni sempre con un take profit impostato al 10% nel sistema ,con quale criterio mi esce  dalle posizioni aperte ? Grazie

    #233465 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Ogni posizione aperta mantiene il suo Take profit e Stop Loss. Io ho fatto questa prova sul DAX, grafico orario, con valori bassi perché il 10% sarebbe altissimo sul DAX:

    DEFPARAM CumulateOrders = True
    ONCE Count = 0
    ONCE N     = 100
    ONCE P     = 200
    ONCE X     = 2
    ONCE W     = 8
    Sma        = average[P,0](close)
    CondL1 = close CROSSES OVER  Sma
    CondS1 = close CROSSES UNDER Sma
    CondL2 = (summation[W](close > Sma) = W)
    CondS2 = (summation[W](close < Sma) = W)
    CondX  = (summation[W](Not OnMarket) = W)
    IF (CondL1 and Not OnMarket and CondX) OR (CondL2 and LongOnMarket and (abs(CountOfPosition) < X)) THEN
       BUY at Market
       myProfit = close + N*PipSize
       set target pprofit N
       set stop  pLoss    N / 2
       count = count + 1
    ELSIF (CondS1 and Not OnMarket and CondX) OR (CondS2 and ShortOnMarket and (abs(CountOfPosition) < X)) THEN
       SELLSHORT at Market
       myProfit = close + N*PipSize
       set target pprofit N
       set stop  pLoss    N / 2
       count = count + 1
    ENDIF
    graphonprice PositionPrice
    graphonprice myProfit coloured("Blue")
    Iván González thanked this post
    #233478 quote
    Antonio GarbinesiAntonio Garbinesi
    Participant
    Average

    grazie Roberto ,provo a testarlo

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

informazioni sul take profit


ProOrder: Trading Automatico & Backtesting

New Reply
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Antonio GarbinesiAntonio Garbinesi
2 years, 3 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 06/01/2024
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...