what do is this code

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #39866 quote
    enzo_52
    Participant
    Senior

     

    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    
    ID = high<high[1] and low>low[1]
    rang = range
    NR4 = rang<range[1] and rang<range[2] and rang<range[3]
     
    
    
    if ID and NR4 then
    test = 1
    hh = highest[4](high)
    ll = lowest[4](low)
    endif
     
    
    
    if test = 1  then
    if time>=020000 and time <=050000 then
    BUY 1 SHARE AT hh STOP
    endif
    endif
    
    if test=1 then
    if time>=200000 and time <=220000 then
    sellshort 1 SHARE AT ll STOP
    endif
    endif
    
    if longonmarket and time >= 200000 and time<=220000 then
    SELL AT ll STOP
    test=0
    
    elsif shortonmarket and time>=020000 and time<=050000 then
    EXITSHORT AT hh STOP
    test=0
    endif
    // Definizione dei parametri del codice
    DEFPARAM CumulateOrders = False // Posizioni cumulate disattivate
    
    
    ID = high<high[1] and low>low[1]
    rang = range
    NR4 = rang<range[1] and rang<range[2] and rang<range[3]
     
    
    
    if ID and NR4 then
    test = 1
    hh = highest[4](high)
    ll = lowest[4](low)
    endif
     
    
    
    if test = 1  then
    if time>=020000 and time <=050000 then
    BUY 1 SHARE AT hh STOP
    endif
    endif
    
    if test=1 then
    if time>=200000 and time <=220000 then
    sellshort 1 SHARE AT ll STOP
    endif
    endif
    
    if longonmarket and time >= 200000 and time<=220000 then
    SELL AT ll STOP
    
    
    elsif shortonmarket and time>=020000 and time<=050000 then
    EXITSHORT AT hh STOP
    
    endif

    Hi guys, i would like to know what is the difference from code 1 and code 2, what they do ?

    thanks a lot

    #39875 quote
    Nicolas
    Keymaster
    Master

    Wrong section of forum again and you already asked this question two times in your other threads…

    Obviously the difference in your code is the “test” variable which is not set to 0 when you are putting stop orders on market.

    #39881 quote
    enzo_52
    Participant
    Senior

    Hi Nicolas, i putted in the Pro buldier support, because  i posted all the code TS ,, just for this reason i used the Pro buldier supports.

    anyway sorry again

    thanks

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

what do is this code


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
enzo_52 @enzo_52 Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 07/05/2017
Status: Active
Attachments: No files
Logo Logo
Loading...