Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Syntax for Line Break bars?

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

    Syntax for Line Break bars?

    It was after much difficulty that I eventually learned the syntax for adding a Renko timeframe to a strategy (it was not the regular AddPeriodType.Renko).

    Now I would like to figure out how to add a Line Break timeframe to a strategy. Is there a similar unique syntax?

    This compiles:
    Code:
    Add(PeriodType.LineBreak,  2);
    As does the simple line I wrote just to test it out:

    Code:
                if  (DoubleStochastics(BarsArray[1], 5).K[0] > 90)[INDENT]            {DrawDiamond("Diamond" + CurrentBar.ToString(), true, 0,  
                 High[0] + (TickSize * 4), Color.Blue);
                }[/INDENT]
    But the strategy won't run on a five-minute chart. Stays "Enabled: False" no matter what I do.

    #2
    Hello hawks67,

    Yes, to add a line break bar you will need to use AddLineBreak().
    http://www.ninjatrader.com/support/h...dlinebreak.htm

    These methods are found in the help guide and I am linking the alphabetical reference to make these a bit easier to find.
    http://www.ninjatrader.com/support/h..._reference.htm
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    81 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    64 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    66 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    54 views
    0 likes
    Last Post CarlTrading  
    Working...
    X