Comment mettre un gain journalier?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #152762 quote
    chelmax
    Participant
    Junior

    Bonjour, je voudrais quelle mettre dans ma strategie pour fermer tout le position quand le gain journalier est atteint ?

    Par exemple: quand ma strategie atteint 200 euro de gain possitif je voudrais que tout autre possible se ferme et que d’autre ne s’ouvre pas.

    #152765 quote
    robertogozzi
    Moderator
    Master

    Le voici, pour le réactiver il faut mettre TradeON = 1 selon vos besoins:

    Once TradeON = 1
    Once MaxProfit = 200  //200€ max profit
    Once MyProfit = 0
    If MyRestartConditions Then
       TradeON = 1
    Endif
    If IntraDayBarIndex = 0 Then
       MyProfit = StrategyProfit
    Endif
    If (StrategyProfit - MyProfit) >= MaxProfit  then
       TradeON = 0
    Endif
    If MyLongConditions And TradeON then
       Buy 1 contract at Market
    Endif
Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.

Comment mettre un gain journalier?


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
chelmax @chelmax Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzi
5 years, 3 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 12/06/2020
Status: Active
Attachments: No files
Logo Logo
Loading...