TARGET GIORNALIERO

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #6114 quote
    alfredo
    Participant
    Average

    Ciao a tutti, è possibile interrompere un ts al raggiungimento di un target giornaliero facendolo ripartire il giorno dopo?

    #6132 quote
    Nicolas
    Keymaster
    Master
     Sì, naturalmente. Si deve prima salvare il profitto strategia attuale ogni nuovo giorno e poi confrontarlo con il profitto in tempo reale. Se si supera, non consentiamo di trading più.

    Con questo tipo di codice, si potrebbe ottenere ciò che si vuole fare qui:

    dailyprofit = 50 //profit in money
    
    if intradaybarindex=0 then 
     savedprofit = strategyprofit
    endif
    
    if strategyprofit >= savedprofit+dailyprofit then 
     allowtrade = 0
    else
     allowtrade = 1
    endif
    
    if buycondition and allowtrade = 1 then
      BUY 1 CONTRACT .......
    ......
    ....
    ..
    
    
    

    Non testarlo, ma che avrebbe funzionato credo. 🙂

    #8099 quote
    nuam1601
    Participant
    Average

    Buongiorno, e se invece volessi fermare un trading system per loss giornaliero?

    Grazie

    Ubaldo

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

TARGET GIORNALIERO


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
alfredo @alfredo Participant
Summary

This topic contains 2 replies,
has 3 voices, and was last updated by nuam1601
9 years, 8 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 04/27/2016
Status: Active
Attachments: No files
Logo Logo
Loading...