Trading system Visual Trader tradotto su ProRealTime

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #37020 quote
    Max
    Participant
    Average

    Qui di seguito una domanda inviata a ProRealTime :

    Buongiorno,
    avrei bisogno per cortesia di trascodificare il seguente TS da linguaggio Visual Trader a linguaggio ProRealTime.
    Vi ringrazio per l’attenzione ed auguro buon lavoro.

    def: Haclose,Haopen,HaHight,HaLow;
    
    HaClose = (O + H + L + C)/4;
    HaOpen = ( HaOpen[1] + (Ref(O,1) + Ref(H,1) + Ref(L,1) + Ref(C,1))/4)/2;
    HaHight = Max(Max(H, HaOpen), HaClose);
    HaLow = Min(Min(l, HaOpen), HaClose);
    
    InstallTakeProfit(INPERC, 1, "TP1", STARTNEXTBAR);
    
    if HaClose > HaOpen and GetNumOpEnterLongToday=0 and GetNumOpEnterShortToday=0 then
    // se la chiusura è maggiore dell'apertura, candela verde quindi
    EnterLong (nextbar, atopen);
    // entra long sulla prossima barra in apertura
    endif;
    
    if HaClose < HaOpen and GetNumOpEnterLongToday=0 and GetNumOpEnterShortToday=0 then
    // se la chiusura è minore dell'apertura, candela rossa quindi
    entershort(nextbar, atopen);
    // entra short sulla prossima barra in apertura
    endif;

     

     E un esempio di risposta :

    IF BarIndex = 0 THEN
    xClose = TotalPrice
    xOpen = Open
    //xHigh = max(High,max(xOpen,xClose))
    //xLow = min(Low,min(xOpen,xClose))
    ELSE
    xClose = TotalPrice
    xOpen = (xOpen[1] + xClose[1])/2
    //xHigh = max(High,max(xOpen,xClose))
    //xLow = min(Low,min(xOpen,xClose))
    ENDIF
    
    if intradaybarindex=0 then
    count=0
    endif
    
    if xClose > xOpen and count=0 then
    buy 1 share at market
    count=count+1
    elsif xClose < xOpen and count=0 then
    sellshort 1 share at market
    count=count+1
    endif
Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Trading system Visual Trader tradotto su ProRealTime


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Max @max Participant
Summary

This topic contains 1 voice and has 0 replies.

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