Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Revisiting the ADXVMA (the _ADXVMA_v01_5_2, to be precise) ...I regret that I'm just experienced enough of a programmer to have this make my head hurt...apologies to all if I can't see the forest for the trees...
I've been playing around with the ADXVMA, and want to incorporate certain (but not all) ADXVMA-generated arrows into my strategy, based on other conditions and such.
After looking carefully at the ADXVMA indicator code, I see that it plots an arrow on Bar[1] the instant the first tick of Bar[0] occurs (FirstTickOfBar).
I suppose my first question would be, what would be the point of using FirstTickOfBar (FTOB) when CalculateOnBarClose (COBC) is set to true up in the Initialize section? The ADXVMA code that does the signal calculation seems to be in the CalculateOnBarClose segment, but the code that does the arrow plotting is occurring within that conditional FirstTickOfBar statement. Why would the logic take place at the close of a bar but the plotting/drawing take place on the opening tick? Aren't the calculations that are made on past closed bars at the open of a new bar the same as calculations made on the same past closed bars at the close of the most recently-closed bar? I suppose where the next bar opens can be different from the previous close and may, in some cases, have an impact on the calculations, but is that the case here?
But more importantly, if a Strategy refers to values assigned in the indicator, how can it be coded to access those values that only exist at FTOB, when the indicator itself is set to COBC? Even if I have the Strategy set to COBC = false, those values just don't make it through. The usual way to do this would be to instantiate the indicators like this:
ADXVMA myADXVMA = ADXVMA(BarsArray[0], 5, true);
and then refer to the indicator's signals using myADXVMA.Signal[0], etc. But this just returns zeroes. The value in Signal[0] at the time the Strategy references it (and it doesn't matter if the Strategy is COBC or not) is not the value assigned at the time of the indicator's FTOB variable-assignments, a fact which is made clear by the fact that the arrow paints but the variable - pulled directly from the array - stays at 0. It's obvious that the variable pulled from the array is from a point in time after the FTOB assignment, I'm assuming at OnBarClose?
I know this is a long and rambling post, but I wanted to be clear; the ADXVMA plots an arrow at the FTOB, based on calculations that were made on COBC. How can I have a Strategy (COBC or otherwise) "get wind" of this ADXVMA FTOB value? How can I get a trigger that will fire in my Strategy in synchronization with the painting of the arrow?
Hi.... I have noticed an issue with the ADXVMA v01.5.2. When the OnBarClose is set to false, sometimes it draws arrows in real time correctly and sometimes the arrows appear after hitting F5 (reloading historical data), obviously after the setup is no longer useful.
Do you know who can address this issue to correct or explain the cause?
This may apply -- if you set an indicator COBC = false, then a condition that may have been true during the creation of the bar (intrabar), such as a condition that would cause an arrow to be painted, may no longer be true at the end of the bar.
For example, if a bar has 500 ticks in it (regardless of bar type), then during one of those 500 ticks the condition that triggers drawing the arrow may have been true. But at the end of the bar, it was no longer true.
So when you load an indicator on a chart for the first time, each bar is calculated COBC=true. Even if you set "COBC=false", NT will calculate historical data/indicators as COBC=true. On the same token, if you press F5 to refresh data, you will see the result of COBC=true calculated data only.
ya i kinda understand.. i guess i like the way it works(still testing) while in COBC=false, but is there a way to get the arrows/alerts to signal that change when the bar officially closes? see this indie seems to be two bars behind when COBC=true.. if it wasnt doing that i wouldnt really have a problem using the COBC=true since my strategy works with waiting for bars to complete before entry..
dont believe anything you hear and only half of what you see
I can't help much with this any longer beyond what I've said already, will need to find another NT programmer. I'm sure one will come to the rescue soon enough