NUMERO MASSIMO ORDINI GIORNALIERI

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #128183 quote
    mat024mat024
    Participant
    Junior

    Salve, come posso fare per limitare il numero massimo di ordini giornalieri? (utilizzando timeframe a 1H)

    DEFPARAM CUMULATEORDERS = False
    defparam flatbefore = 090000
    defparam flatafter = 173000
    
    
    //c1 = average [22]
    c3 = CALL adattiva[5, 2, 26]
    //c2 = average [9]
    
    if average [3] < c3 then
    buy 1 lot at market
    endif
    
    if average[3] > c3  then
    sellshort 1 lot at market
    endif
    
    #128188 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Devi usare un contatore, che ad ogni inizio giornata rimetti a 0.

    Ogni volta che viene eseguito un BUY o un SELLSHORT aggiungi 1.

    Alle tue condizioni aggiungi che il contatore non sia >=

    DEFPARAM CUMULATEORDERS = False
    defparam flatbefore = 090000
    defparam flatafter = 173000
    ONCE Contatore = 0
    IF IntraDayBarIndex = 0 THEN
       Contatore = 0
    ENDIF
    //c1 = average [22]
    c3 = CALL adattiva[5, 2, 26]
    //c2 = average [9]
     
    if average [3] < c3  AND Contatore < 3 AND Not OnMarket then
       buy 1 lot at market
       Contatore = Contatore + 1
    endif
     
    if average[3] > c3  AND Contatore < 3 AND Not OnMarket then
       sellshort 1 lot at market
       Contatore = Contatore + 1
    endif

     

    3 e che non sia già a mercato:

    #128286 quote
    mat024mat024
    Participant
    Junior

    Perfetto!

    Grazie Mille

Viewing 3 posts - 1 through 3 (of 3 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

NUMERO MASSIMO ORDINI GIORNALIERI


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
mat024 @mat024 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by mat024mat024
6 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 04/26/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...