Comment mettre un gain journalier?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #152762 quote
    chelmaxchelmax
    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
    robertogozzirobertogozzi
    Moderator
    Legend

    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.
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

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 robertogozzirobertogozzi
5 years, 11 months ago.

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