traduzione codice automatic trading

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #74998 quote
    alfredoalfredo
    Participant
    Average

    Buongiorno, qualcuno sa tradurmi questo codice per la prorealtime?

    inputs:period_ma(20), lookback(1),lookback2(1),factor(1.25);

     value1= average(c,period_ma) – average(c,period_ma)[lookback];

    condition1 = average(c,period_ma) < average(c,period_ma)[lookback];

    condition2 = value1<value1[lookback2]*factor;

     If condition1 and c < average(c,period_ma) and condition2

        then sellshort 100000/c shares this bar at close else buytocover this bar on close;

     if not condition1 then buytocover this bar on c;  

    grazie,

    Alfredo

    #75078 quote
    NicolasNicolas
    Keymaster
    Legend

    Ciao, non ho provato ma potresti provare il codice tradotto qui sotto:

    periodma=20
    lookback=1
    lookback2=1
    factor=1.25
    
     value1= average[periodma] – average[periodma][lookback]
    
    condition1 = average[periodma] < average[periodma][lookback]
    
    condition2 = value1<value1[lookback2]*factor
    
    If condition1 and close < average[periodma] and condition2 then 
     sellshort 100000/close shares at market 
    else exitshort at market 
    endif
    
     if not condition1 then 
      exitshort at market 
    endif

    Fateci sapere se tutto funziona correttamente.

    #75179 quote
    alfredoalfredo
    Participant
    Average

    Ciao, intanto grazie mille, mi da questo errore

    errore di sintassi linea 14, carattere 6

    #75748 quote
    NicolasNicolas
    Keymaster
    Legend

    Spiacenti, ho fatto un errore alla riga 14, per favore prova questo codice:

    periodma=20
    lookback=1
    lookback2=1
    factor=1.25
    
     value1= average[periodma] – average[periodma][lookback]
    
    condition1 = average[periodma] < average[periodma][lookback]
    
    condition2 = value1<value1[lookback2]*factor
    
    If condition1 and close < average[periodma] and condition2 then 
     sellshort 100000/close shares at market 
    else 
     exitshort at market 
    endif
    
     if not condition1 then 
      exitshort at market 
    endif
Viewing 4 posts - 1 through 4 (of 4 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

traduzione codice automatic trading


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
alfredo @alfredo Participant
Summary

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

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