Stop trading when strategy in profit for the day

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

    Hi

    Could someone help me with this please. How do I make a strategy stop trading for the day once it has a wining trade on that day ie what code do I need to add to stop it initiating more trades?

    Thank you

    #196412 quote
    robertogozzi
    Moderator
    Master

    There you go:

    Once TradeOK = 1
    If IntraDayBarIndex = 0 then
       TradeOK = 1
    Endif
    If StrategyProfit > StrategyProfit[1] then
       TradeOK = 0
    Endif
    #196670 quote
    shahroor
    Participant
    New

    Thank you very much Robert.

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

Stop trading when strategy in profit for the day


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
shahroor @shahroor Participant
Summary

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

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 06/29/2022
Status: Active
Attachments: No files
Logo Logo
Loading...