Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Entry at higher/lower than previous candle

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

    #16
    Hello Jim H.,

    Thank you for your reply.

    It's important to keep in mind that in a backtest, fills are determined based on 4 data points, OHLC of a bar since that is the only information that is known during a backtest and there will be no intra-bar data. This means actions cannot happen intra-bar, fills cannot happen intra-bar. All prices and actions come from and occur when the bar closes as this is all the information that is known.

    Because of this, OnBarUpdate will only update 'On bar close' as it does not have the intra-bar information necessary for 'On price change' or 'On each tick'.

    Also, here is a link to the differences on real-time vs backtest (historical).
    http://ninjatrader.com/support/helpG...ime_vs_bac.htm

    So if you're running the strategy on each tick on live data, any positions calculated in a backtest or on historical data on a chart will actually be calculated as if you were running the strategy On Bar Close instead of On Each Tick. That may be the source of the strategy appearing to not calculate as you'd expect if you're not actually looking at what it's doing when running it on live data.

    You can set up a crossover condition to check the previous bar and the one prior to it if you like, just set the bars ago for both the MACDs to 1:

    Click image for larger version

Name:	2021-02-09_08-50-14.png
Views:	292
Size:	48.3 KB
ID:	1140842

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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    119 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X