Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

IntraBar Condition

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

  • manueldecastro
    replied
    Gracias Brandon. solucioné el error usando otras condiciones. se puede cerrar el hilo

    Leave a comment:


  • manueldecastro
    replied
    Originally posted by NinjaTrader_BrandonH
    Hello manueldecastro,

    Thanks for your post.

    The condition you shared would correct to detect if the current Low price is less than the previous Low price.

    That would also be correct logic for checking if the current High price is greater than the previous High price.

    If the script has the Calculate mode set to Calculate.OnBarClose, the OnBarUpdate() logic will only process at the close of a bar.

    To have logic calculate intrabar, you could set the Calculate mode to Calculate.OnPriceChange or Calculate.OnEachTick.

    Calculate.OnPriceChange would have OnBarUpdate() logic process for each change in price. Calculate.OnEachTick would have OnBarUpdate() logic calculate for each incoming tick.

    See this help guide page for more information about Calculate: https://ninjatrader.com/support/help.../calculate.htm

    To understand how your logic is behaving, debugging prints need to be added to the script. Add prints one line above the conditions that print out all the values being used in the condition along with the Time of the bar. Prints will appear in a New > NinjaScript Output window.

    See this NinjaTrader Support article for information about using Print() to understand the behavior of a script: https://support.ninjatrader.com/s/ar...nd-TraceOrders
    Hi Brandon,
    Im working OneachTick.

    Leave a comment:


  • manueldecastro
    started a topic IntraBar Condition

    IntraBar Condition

    I need to make a condition for when the following is met.
    A candlestick should have a lower low than the previous one and then have a higher high than the previous one.

    I've tried the following code but it doesn't draw the signals for me correctly. Could you give me some ideas?

    bool signal = false;
    if (Low[0]<Low[1])
    {signal = true;}

    if (signal==true && High[0]>High[1])
    {Draw.ArrowDown(this, @"Signal " + CurrentBar, false, 0, High[0]+2, Brushes.Blue);}

    I need the signal to be drawn when the price goes down from low1 and then exceeds high1. The current candlestick may have made a higher high than high1 before dropping below low1.

    Thanks!

Latest Posts

Collapse

Topics Statistics Last Post
Started by futurenow, 12-06-2021, 05:49 PM
19 responses
995 views
0 likes
Last Post Redders
by Redders
 
Started by mathfrick2023, 05-08-2025, 12:51 PM
8 responses
103 views
0 likes
Last Post Yogaman
by Yogaman
 
Started by several, 04-22-2025, 05:21 AM
2 responses
274 views
0 likes
Last Post Lukasxgtx  
Started by NTEducationTeam, 06-12-2025, 02:30 PM
0 responses
40 views
0 likes
Last Post NTEducationTeam  
Started by NTEducationTeam, 06-05-2025, 09:43 AM
0 responses
122 views
0 likes
Last Post NTEducationTeam  
Working...
X