Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
indicator on different values
Collapse
X
-
Hello Boonfly8,
Thanks for your post.
If you are looking for previous values you can just use the barsago of the MACd.diff plot
If you are looking for the maximum movement during the current bar, the currently forming bar (and diff plot) may well change during the bar formation and the diff plot may grow larger or smaller depending on the relationship of the MACD and MACD.avg lines. If you are wanting to find the maximum movement of the plot during the current bar formation then you can accomplish this by saving the current diff value to a variable and then comparing the next ticks diff value to the variable and save if larger. At the end of the bar the maximum would then be in the variable. You would use if (IsFirstTickOfBar) as the start and end point.Paul H.NinjaTrader Customer Service
-
Originally posted by NinjaTrader_Paul View PostHello Boonfly8,
Thanks for your post.
If you are looking for previous values you can just use the barsago of the MACd.diff plot
If you are looking for the maximum movement during the current bar, the currently forming bar (and diff plot) may well change during the bar formation and the diff plot may grow larger or smaller depending on the relationship of the MACD and MACD.avg lines. If you are wanting to find the maximum movement of the plot during the current bar formation then you can accomplish this by saving the current diff value to a variable and then comparing the next ticks diff value to the variable and save if larger. At the end of the bar the maximum would then be in the variable. You would use if (IsFirstTickOfBar) as the start and end point.
Comment
-
Hello Boonfly8,
Thanks for your reply.
Just to be sure we are saying the same thing, MACD.Diff[0] will provide the current (tick) value of the MACD diff plot and may change on each tick until the bar closes at which point the diff value will be fixed and would be seen as historical. MACD.Diff[1] would be the prior bar completed and unchanging diff value, MACD.Diff[2] would be the completed bar before that, etc. etc.
If you need the maximum that the diff plot was during the forming bar then you can accomplish this by saving the current diff value to a variable and then comparing the next ticks diff value to the variable and save if larger. At the end of the bar the maximum would then be in the variable. You would use if (IsFirstTickOfBar) as the start and end point.Paul H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by arvidvanstaey, Today, 02:19 PM
|
4 responses
11 views
0 likes
|
Last Post Today, 04:08 PM | ||
Started by samish18, 04-17-2024, 08:57 AM
|
16 responses
61 views
0 likes
|
Last Post
by samish18
Today, 03:30 PM
|
||
Started by jordanq2, Today, 03:10 PM
|
2 responses
9 views
0 likes
|
Last Post
by jordanq2
Today, 03:23 PM
|
||
Started by traderqz, Today, 12:06 AM
|
10 responses
18 views
0 likes
|
Last Post
by traderqz
Today, 02:49 PM
|
||
Started by algospoke, 04-17-2024, 06:40 PM
|
5 responses
48 views
0 likes
|
Last Post Today, 02:36 PM |
Comment