Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to get Day of Month
Collapse
X
-
Thanks Bertrand.
Sorry, I'm novice as you may figure out. I´ve written this simple indicator but it doesn´t draw anything.
protected override void OnBarUpdate()
{
if (Time[0].Date.Month > Time[1].Date.Month || Time[0].Date.Month < Time[1].Date.Month) Plot0.Set(1);
else Plot0.Set(0);
}
Comment
-
-
This approach may run into problems, if the first day of the month is a Saturday.Originally posted by NinjaTrader_Cal View PostHarry,
Yes, that would work as well.
I have provided a sample script of another method of how to detect a new month.
This script will detect when its the first of the month thus a new month is checked.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
368 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 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
571 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

... but then couldn't we use
Comment