Retranscrire un SL touché comme un évenement

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #191874 quote
    Arnaud Jean-Louis
    Participant
    New

    Bonjour,

    Tout d’abords je tiens à m’excuser si ce sujet est en doublon, il me semblait l’avoir posté hier soir mais ce matin aucune trace du post en question donc voici ma question:

    est-il possible de retranscrire un SL déclenché précédemment comme un événement où je pourrai par la suite y rajouter une condition, exemple:

    Exemple 1: Si un SL a été déclenché durant mes 7 dernières bougies, alors ne pas prendre de position même si un signal a été détecté pendant cette période.

    Exemple 2: Si 2 SL ont été touchés aujourd’hui, ne plus prendre de position dans la journée.

    #191881 quote
    Nicolas
    Keymaster
    Master

    Pour l’exemple 1, on peut tester si le STRATEGYPROFIT a baissé sur les 7 dernières bougies:

    ex1 = summation[7](strategyprofit<strategyprofit[1]) > 0

    si ex1 = 1 , alors c’est vrai, donc inclure cette condition dans ta chaîne conditionnelle pour ouvrir une nouvelle position.

    Pour ton exemple 2, il  y a pléthores d’exemples sur le site sur la limitation de trades quotidiens, malgré cela, je pense à cette petite fonction qui pourrait convenir:

    sl = strategyprofit<strategyprofit[1]
    
    ex2 = summation[intradaybarindex](sl) >= 2

    si ex2 = 1 , alors il y a eu au moins 2 positions perdantes durant la journée.

    Arnaud Jean-Louis thanked this post
    #191905 quote
    Arnaud Jean-Louis
    Participant
    New

    Merci beaucoup pour cette solution simple et efficace!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Retranscrire un SL touché comme un évenement


ProOrder : Trading Automatique & Backtests

New Reply
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Arnaud Jean-Louis
3 years, 10 months ago.

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