Cumul d’ordre limité

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

    Bonjour j’ai voulu faire en sorte que mon algo puisse augmenter sa taille de position en fonction de mes parametres.

    J’ai donc entré le code suivant : “DEFPARAM CumulateOrders = true”

    Cela fonctionne très bien mais est il possible de limiter le nombre d’ordre à X ordres ?

    Pour que par exemple mon algo ne puisse prendre que 5 positions en même temps.

     

    Merci d’avance!

    #161753 quote
    NicolasNicolas
    Keymaster
    Legend

    Tu peux récupérer la quantité de position au marché avec cette instruction: COUNTOFPOSITION

    Ainsi il est facile de créer une condition avant d’entrer à nouveau :

    if macondition and abs(countofposition)<5 then 
     // go! 
    endif

    J’utilise la valeur absolue car la valeur est négative en cas de vente à découvert.

    #161847 quote
    UmbraproUmbrapro
    Participant
    Junior

    C’est exactement ce que je recherché merci!

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

Cumul d’ordre limité


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
Umbrapro @umbrapro Participant
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 02/16/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...