Codice strategia

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #14996 quote
    Luigi5192Luigi5192
    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
    NicolasNicolas
    Keymaster
    Legend

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

    #15021 quote
    Luigi5192Luigi5192
    Participant
    Average

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

    #15024 quote
    NicolasNicolas
    Keymaster
    Legend

    Questo dovrebbe funzionare lo stesso nel tuo esempio.

    #15026 quote
    Luigi5192Luigi5192
    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.
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

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 Luigi5192Luigi5192
9 years, 11 months ago.

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