Codice strategia

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14996 quote
    Luigi5192
    Participant
    Average

    salve a tutti,avrei un problema con un codice che sto cercando di creare.

    Nella mia strategia ho creato un sistema con una condizione e più alternative alla condizione principale.

    Il codice è il seguente:

    IF c1 AND c2 AND c3 AND c4 THEN
    BUY 1 CONTRACT AT MARKET
    SET STOP PLOSS 30
    ELSIF c5 AND c6 AND c7 AND c4 THEN
    BUY 1 CONTRACT AT MARKET
    SET STOP PLOSS 25
    
    ELSIF c8 AND c9 AND c10 AND c4 THEN
    BUY 1 CONTRACT AT MARKET
    SET STOP PLOSS 25
    
    ELSIF c11 AND c12 AND c13 AND c4 THEN
    BUY 1 CONTRACT AT MARKET
    SET STOP PLOSS 18
    else
    endif

     

    Ho creato una strategia principale con IF e 3 alternative diverse una dall’altra a quella principale.

    Ora vorrei chiedere se va bene come lo impostato oppure va fatta una modifica?

    grazie, saluti.

    #15017 quote
    Nicolas
    Keymaster
    Master

    Si dovrebbe funzionare come previsto. È necessario eliminare la linea 15, che non è necessario a tutti.

    #15021 quote
    Luigi5192
    Participant
    Average

    grazie per la risposta, e volevo sapere, Else se lo utilizzo a posto di Elsif che cosa succede?

    #15024 quote
    Nicolas
    Keymaster
    Master

    Questo dovrebbe funzionare lo stesso nel tuo esempio.

    #15026 quote
    Luigi5192
    Participant
    Average

    ok la ringrazio, saluti.

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

Codice strategia


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Luigi5192 @luigi5192 Participant
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Luigi5192
9 years, 4 months ago.

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