trades counter with trade opening/closing in the same bar ?

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #260935 quote
    oliTRoliTR
    Participant
    Average

    how to account for a trade which opens and closes in the same bar in a number of trades counter ?

    thank you

    #260944 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Upon these conditions:


    a) your strategy does NOT stop & reverse

    1. it is NOT OnMarket in the current bar
    2. it was NOT OnMarket the prior bar
    3. StrategyProfit <> StrategyProfit[1]


    b) your strategy DOES stop & reverse

    1. OnMarket
    2. StrategyProfit <> StrategyProfit[1]


    You can OR both the cases if your strategy may do both kind of trades.



    Iván González thanked this post
    #261144 quote
    oliTRoliTR
    Participant
    Average

    Grazie Roberto,

    found the trick using “LongTriggered” and “ShortTriggered” expressions

    robertogozzi thanked this post
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

trades counter with trade opening/closing in the same bar ?


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
oliTR @olitr Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by oliTRoliTR
4 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 05/09/2026
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...