Fonction ONMARKET et attente pour nouvelles positions

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

    Bonjour à tous,

    Je suis en train de finaliser mon code, et je n’arrive pas à faire marcher la fonction ONMARKET. En effet, j’aimerai que l’algo ne prenne pas de nouvelle position si j’avais déjà une position il y a 3 minutes, il y a 2 minutes et il y a 1 minute. D’où ma variable :

     

    //waiting time
    if onmarket[1] and onmarket[2] and onmarket[3] then
    waiting=0
    else
    waiting=1
    endif

     

     

    lorsque je l’applique, le programme ne trade plus du tout.

     

    Merci par avance

    #85270 quote
    NicolasNicolas
    Keymaster
    Legend

    J’aurai plutôt utilisé le barindex et un comptage des périodes révolues comme ceci :

    wait = 3 //quantité de bougies à attendre 
    
    condition = barindex-tradeindex(1)>wait //
    jachete = close>open
    
    if jachete and condition then 
     buy at market 
    endif

    La variable ‘condition’ est booléenne est sera égale à 1 si la quantité de barres à attendre est dépassée.

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

Fonction ONMARKET et attente pour nouvelles positions


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
jest @jest Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by NicolasNicolas
7 years, 11 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 11/19/2018
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...