ogni x giorni aumenta una posizione

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #19886 quote
    papero76
    Participant
    Senior

    buongiorno

    sto cercando di realizzare un codice che ogni x giorni aumenta la posizione di 1 lotto se la percentuale di profitto è maggiore di y

     

    grazie

    #19909 quote
    Nicolas
    Keymaster
    Master

    se la percentuale di profitto è maggiore rispetto a ieri?

    #19968 quote
    papero76
    Participant
    Senior

    si Nicolas

    #48825 quote
    papero76
    Participant
    Senior

    ciao Nicolas potresti suggerirmi qualcosa?

    grazie in anticipo

    #48884 quote
    Nicolas
    Keymaster
    Master

    Penso che questo piccolo codice dovrebbe fare il trucco, ovviamente dovrà incorporarlo nel proprio codice di trading automatico

    if intradaybarindex = 0 then 
     if strategyprofit>currentprofit then 
      mylot=mylot+1
     endif
     currentprofit = strategyprofit
    endif
    
    if buycondition then 
     buy mylot contracts at market 
    endif
    #48916 quote
    papero76
    Participant
    Senior

    GRAZIE NICOLAS

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

ogni x giorni aumenta una posizione


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
papero76 @papero76 Participant
Summary

This topic contains 5 replies,
has 2 voices, and was last updated by papero76
8 years, 4 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 01/05/2017
Status: Active
Attachments: No files
Logo Logo
Loading...