Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Point counter indicator on each bar
Collapse
X
-
Point counter indicator on each bar
---------kfkjkjhkhklghLast edited by tradingnasdaqprueba; 10-12-2023, 02:00 AM.Tags: None
-
This Bar Counter will help with some modification for '_________ ' ,see link , https://ninjatraderecosystem.com/use...d/bar-counter/
-
Hello tradingnasdaqprueba,
Thank you for your post.
You can get the High and Low values for the current bar using the High and Low series.
High - https://ninjatrader.com/support/helpGuides/nt8/high.htm
Low - https://ninjatrader.com/support/helpGuides/nt8/low.htm
You could then calculate the range and divide it by the TickSize by accessing the value for each bar.
double Points = (High[0] - Low[0]) / TickSize
TickSize - https://ninjatrader.com/support/help...8/ticksize.htm
You can draw text below the bar using Draw.Text().
Draw.Text() Help Guide page - https://ninjatrader.com/support/help.../draw_text.htm
Draw.Text(NinjaScriptBase owner, string tag, string text, int barsAgo, double y)
If you want to draw on the building bar, make sure you are using the appropriate Calculate setting. OnBarClose means OnBarUpdate will only update or draw the text when the bar has closed.
Calculate Help Guide page - https://ninjatrader.com/support/help.../calculate.htm
Please let me know if you have any other questions.
Comment
-
Perfect! Thank you Gaby it works perfectlyLast edited by tradingnasdaqprueba; 10-12-2023, 02:00 AM.
Comment
-
Chelsea B.NinjaTrader Customer Service
Comment
-
Hello Chelsea,
Could you please tell me where should I include this state? Thanks!
Last edited by tradingnasdaqprueba; 10-12-2023, 01:56 AM.
Comment
-
Hello Chelsea,
IThanks a lot again for the help!
Last edited by tradingnasdaqprueba; 10-12-2023, 02:01 AM.
Comment
-
Hello Gaby,
Thank you so much! now works perfectly.
Last edited by tradingnasdaqprueba; 10-12-2023, 02:01 AM.
Comment
-
Hello,
You can check for if the previous bar was a red candle if the closing price was lower than its opening price, and for a green candle if the close was higher than its opening price.
Open - https://ninjatrader.com/support/helpGuides/nt8/open.htm
Close - https://ninjatrader.com/support/help.../nt8/close.htm
Please let us know if we can assist further.Code:if (Close[0] > Open[0]) // candle is an up 'green' bar
Comment
-
-
-
Hi Gaby,
Okey Thanks, one more question, by using the code:
Code:if (State == State.Historical && CurrentBar < Count - 20) return;
It starts counting from the last 20 bars but I wolud like to update it so always are 20 bars displayed and not counting all the bars from the starting last 20...
Thanks a lot!!!
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
608 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
355 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
560 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
561 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment