Empecher une entrée en position après un trade perdant.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #202963 quote
    wlshr27
    Participant
    New

    Bonjour la commu, bonjour Nicolas !

    Je suis à la recherche d’une ligne code qui permettrait d’empecher mon algo de trader sur les X bougies suivantes un trade perdant. En effet j’ai remarqué que dans mon backtest, quand un trade est perdant, j’ai generalement 1 ou 2 nouveaux trades perdants qui suivent derriere alors je cherche un moyen de stopper l’hemorragie et de reprendre un peu plus tard.

     

    Merci, et bonne fin de week-end à tous et à toutes l’equipe du forum !!

    #202976 quote
    wlshr27
    Participant
    New

    S’il est impossible de coder le critère perdant d’un trade, j’aimerais au moins trouver une ligne de code qui permettrait à mon algorithme d’entrer en position à X bougie d’intervalles…

    #202980 quote
    wlshr27
    Participant
    New

    Je pense avoir trouvé grace aux archives : BARINDEX-TRADEINDEX > x bougies

    #203291 quote
    Nicolas
    Keymaster
    Master

    Bien joué, en plus pour tester si le dernier trade était perdant, je peux utiliser POSITIONPERF:

    x = 10
    test = (BARINDEX-TRADEINDEX > x and positionperf(1)<0)
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Empecher une entrée en position après un trade perdant.


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
wlshr27 @wlshr27 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Nicolas
3 years, 4 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 10/23/2022
Status: Active
Attachments: No files
Logo Logo
Loading...