Ordini su candela setup

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #23252 quote
    MarcoTo
    Participant
    New

    Buongiorno, sono nuovo di prorealtime e vorrei chiedervi aiuto

    Vorrei creare un EA che ponga degli ordini limite al determinarsi delle condizioni di ingresso. Questi ordini devono rimanere a mercato fino a che non vengano eseguiti.

    Vi espongo la strategia: se ho una candela con un Range elevato il programma deve piazzare degli ordini pendenti all’open o al close della candela di setup.

    Grazie per chi vorra aiutarmi

    #23432 quote
    Nicolas
    Keymaster
    Master

    Di seguito riportiamo la richiesta del codice.
    Ho messo come una variabile della gamma della candela, in modo da poter cambiare a piacimento.
    Secondo la vostra richiesta, gli ordini limite di attesa rimarranno fino a quando uno dei due traffici innescano a la prima volta.

    defparam cumulateorders=false
    
    //---parameter
    myrange = 30 //define in points
    takeprofit = 10
    stoploss = 10
    //---
    
    if range>myrange*pointsize and barindex<>savedbar then 
    hh = high
    ll = low
    savedbar = barindex
    endif
    
    if NOT ONMARKET AND hh>0 and close<hh and close>ll then
    BUY 1 CONTRACT AT ll LIMIT 
    SELLSHORT 1 CONTRACT AT hh LIMIT 
    endif 
    
    set target pprofit takeprofit
    set stop ploss stoploss
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Ordini su candela setup


Supporto Piattaforma: Grafici, Dati e Broker

New Reply
Author
author-avatar
MarcoTo @marcoto Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by Nicolas
9 years ago.

Topic Details
Forum: Supporto Piattaforma: Grafici, Dati e Broker
Language: Italian
Started: 01/31/2017
Status: Active
Attachments: No files
Logo Logo
Loading...