TP BB haute

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #250402 quote
    paulPRT
    Participant
    New

    Bonjour,

     

    Je souhaiterai coder une stratégie qui achète si le prix touche la bollinger basse, qui met un SL sous le plus bas et un TP sur la bollinger haute.

    Le TP va donc changer à chaque période.

     

    Avez vous une idée de comment faire ?

     

    En vous souhaitant une très bonne journée

    #250407 quote
    JS
    Participant
    Senior

    Salut,
    Essayez ces…

    DefParam CumulateOrders=False
    
    Period=20
    Mult=2 //2 * Standard Deviation
    SL=20 //StopLoss Points
    
    BollUp=Average[Period,0](Close)+Std[Period](Close)*Mult
    BollDown=Average[Period,0](Close)-Std[Period](Close)*Mult
    
    If Close crosses over BollDown then
    Buy 1 contract at Market
    Set Stop Price BollDown-SL
    Set Target Price BollUp
    EndIf
    
    If LongOnMarket then
    Set Stop Price BollDown-SL
    Set Target Price BollUp
    EndIf
    
    GraphOnPrice BollUp Coloured("Green")
    GraphOnPrice BollDown Coloured("Red")
    robertogozzi and Iván González thanked this post
    Scherm­afbeelding-2025-09-06-om-13.09.20.png Scherm­afbeelding-2025-09-06-om-13.09.20.png
    #250411 quote
    paulPRT
    Participant
    New

    Merci Beaucoup !

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

TP BB haute


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
paulPRT @paulprt Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by paulPRT
5 months, 3 weeks ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 09/06/2025
Status: Active
Attachments: 1 files
Logo Logo
Loading...