Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

¿workaround to avoid all synthetic bars when backtesting on range bars?

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

    ¿workaround to avoid all synthetic bars when backtesting on range bars?





    good day to everyone,


    range bars can be a great tool to filter out noise around a more defined trend. however, in most trading platforms range bars do not allow for gaps and will instead fill all observed gaps in price with "synthetic" (fake) data. this means that when backtesting or optimizing strategies on range bars, the backtesting engine will treat this fake data as if it had been real and it had been possible to place trades on these bars. in turn, this means that trend following strategies will seem to never have taken losses from large gaps that in fact drastically reversed a trend but it will seem as if the strategy would have detected the reversal on time and appropriately reversed its position, when we know all of this is just impossible as the bars from "synthethic" data never existed during any real trading sessions.


    nt does use "synthethic" bars when charting on range bars and i want to find a way so that my strategies will only place trades during bars generated from real, historical, observed data and thus will ignore all "synthethic" data. i imagine all "synthethic" bars must be given time stamps outside of the real, regular trading sessions for different instruments (for example, later than 17:00 and earlier than 18:00 et for futures). if this is correct, ¿can i use a time filter to force my strategies to only enter and exit trades during regular trading session hours? ¿how could i do this? ¿if not, is there any other method to make my strategies avoid all "synthethic" bars when opening and closing positions? ¿when will nt provide a new kind of range bars that simply do allow for gaps? several users have made this request repeatedly but nt has never delivered.



    very well, thanks a lot, regards.

    #2
    Hello rtwave,

    I want to confirm, are you specifically looking to place orders within the trading hours session?

    This is automatic with NinjaTrader. The Strategy will only be able to receive data and place orders during the hours specified by the Trading Hours template.

    You can create a time filter for things if you desire.

    Below is a link to the reference sample.



    Or are you asking about range bars?

    Range bars are made solely based on price movement when the price breaks the range and are created with individual ticks. These should be the same in real-time as they are historically when made with the same ticks.
    ​​​​​​​
    Below is a public link to the help guide.
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by techgetgame, Today, 11:42 PM
    0 responses
    7 views
    0 likes
    Last Post techgetgame  
    Started by sephichapdson, Today, 11:36 PM
    0 responses
    1 view
    0 likes
    Last Post sephichapdson  
    Started by bortz, 11-06-2023, 08:04 AM
    47 responses
    1,612 views
    0 likes
    Last Post aligator  
    Started by jaybedreamin, Today, 05:56 PM
    0 responses
    9 views
    0 likes
    Last Post jaybedreamin  
    Started by DJ888, 04-16-2024, 06:09 PM
    6 responses
    19 views
    0 likes
    Last Post DJ888
    by DJ888
     
    Working...
    X