Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Same bar Exit

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Same bar Exit

    During a backtest due to the lack of granularity inside the current bar it's impossible to tell whether a trade would reflect a real life situation.
    What would be the best way to restrict the Strategy Analyzer to close position within the entry bar? This is for Strategy wizard NT7 using Profit Target (ticks) as the exit condition
    Last edited by sashe71; 01-09-2020, 07:06 PM.

    #2
    Hello sashe71,

    Thank you for your note.

    There would be no way within the Strategy Wizard to add intrabar granularity for use in backtesting - you would need to unlock the code to add the necessary secondary data series. We've got an example in our help guide on how to set this up:



    You can import this through File > Utilities > Import NinjaScript. Once imported, you can open it under Tools > Edit NinjaScript > Strategy. You can then review the code, test it, and modify or use parts of the code to fit your needs.

    Alternatively, you can download Market Replay data for many instruments that you can use to playback your strategy as if it was running in real time using the Market Replay Connection - as Market Replay data does have intrabar granularity, you are able to run a Strategy on each tick instead of on bar close.



    Please let us know if we may be of further assistance to you.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    557 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X