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

Time-Flexible Bars

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

    Time-Flexible Bars

    Hi all,

    For the lack of a better subject line I am calling this "time-flexible bars" and refer to the following:

    If I look at a 5-minute bar chart, the 5-minute period is set by default from say 9:35 to 9:40 and from 9:40 to 9:45 and from 9:45 to 9:50 etc. I wonder if there is a way to change this to for example 9:36 to 9:41 and from 9:41 to 9:46 and from 9:46 to 9:51 etc.

    It may seem irrelevant but the challenge I find is that whatever happens in a 5-minute interval (or any interval) is to some degree random. For example, the Stochastics indicator may be below 80 because the close of the 5-minute bar happens to be 1 tick lower just when the bar closes but actually it was 1 tick higher 1 second before and after (which would have made Stochastics stay just above 80). Therefore, whether you get a valid signal or not is subject to a certain "randomness". I am not yet sure it matters or if any indicator/strategy will end up with some randomness somewhere, or if a strategy that is this "sensitive" can be a good strategy, but I hope you get my point.

    So, I am thinking about a way to remove that randomness and capture signals "around" the 5-minute interval that I am looking at. And changing the default intervals may be a way to do that. For example, I could feed 3 different Stochastics figures from three different 5-minute bars (9:34 to 9:39, 9:35 to 9:40, 9:36 to 9:41) and then deal with the results.

    Does anyone have thoughts on that? Thank you!

    p




    #2
    Hello pennywise,

    From the given details you may want to take a look into making a custom BarsType for that purpose. The standard minute types work based on the data you have, if you wanted to collect that data into bars in a different way the BarsType would be where to do that.

    You could otherwise add secondary series to the script like you mentioned and then work with the multiple series however you needed. We have some documentation covering multi series use cases here: https://ninjatrader.com/support/help...lightsub=multi

    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CortexZenUSA, Today, 12:53 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by usazencortex, Today, 12:43 AM
    0 responses
    5 views
    0 likes
    Last Post usazencortex  
    Started by sidlercom80, 10-28-2023, 08:49 AM
    168 responses
    2,266 views
    0 likes
    Last Post sidlercom80  
    Started by Barry Milan, Yesterday, 10:35 PM
    3 responses
    13 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Working...
    X