Stop trading when strategy in profit for the day

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

    There you go:

    Once TradeOK = 1
    If IntraDayBarIndex = 0 then
       TradeOK = 1
    Endif
    If StrategyProfit > StrategyProfit[1] then
       TradeOK = 0
    Endif
    #196670 quote
    shahroorshahroor
    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.
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

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 shahroorshahroor
4 years, 3 months ago.

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