ADXVMA arrows in Strategy - futures io
futures io



ADXVMA arrows in Strategy


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Big Mike with 2 posts (1 thanks)
    2. looks_two madLyfe with 2 posts (0 thanks)
    3. looks_3 aslv2000 with 1 posts (0 thanks)
    4. looks_4 hawks67 with 1 posts (1 thanks)
    1. trending_up 3,935 views
    2. thumb_up 2 thanks given
    3. group 5 followers
    1. forum 7 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • 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 and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

ADXVMA arrows in Strategy

(login for full post details)
  #1 (permalink)
 hawks67 
Chicago, IL
 
Experience: Intermediate
Platform: NinjaTrader
Broker: AGN/Rithmic
Trading: CL
 
Posts: 22 since Apr 2010
Thanks: 14 given, 2 received

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).
if(FirstTickOfBar) DrawArrowUp(CurrentBar.ToString(), 1, val, _barColorUp);

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?

Thank you in advance for indulging me,
Gary

Started this thread Reply With Quote
The following user says Thank You to hawks67 for this post:

Can you help answer these questions
from other members on futures io?
For the experts of Metastock
Platforms and Indicators
TD Sequential for NT or MW?
Platforms and Indicators
Eurex Denali vs dxFeed
Sierra Chart
Is there inherently more opportunity in smaller markets?
Traders Hideout
Experience with AGN (Introducing Broker)
Brokers
 
 
(login for full post details)
  #3 (permalink)
 max-td 
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received


hi Gary,
interesting topic - i also wait about some ideas
i have no solution to offer but i push it up again - maybe we get some inputs !

last year we had lots of discussions about ADXVMA here and it never was clear whats up with this thing somehow.
there are diff versions arround etc.

but you Question now belongs to the first-tickof-bar-topic - so thats a bit different i think.

wouldnt it be easier to catch the barclose for your trigger ?
it shouldnt be much different



max-td
Reply With Quote
 
(login for full post details)
  #4 (permalink)
 aslv2000 
Bogota, Colombia, South Americ
 
Experience: Intermediate
Platform: NinjaTrader
 
Posts: 12 since Nov 2009
Thanks: 4 given, 1 received

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?

Thank you.

Reply With Quote
 
(login for full post details)
  #5 (permalink)
 madLyfe 
Des Moines, Iowa
 
Experience: None
Platform: Ninja, TOS
Broker: AMP/CQG, TOS
Trading: CL, TF, GC
 
madLyfe's Avatar
 
Posts: 1,644 since Feb 2011
Thanks: 9,220 given, 1,016 received

i am also noticing this issue.. any of the pros have any idea?

dont believe anything you hear and only half of what you see

\_(ツ)_/

(╯□)╯︵ ┻━┻
Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #6 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
 
Big Mike's Avatar
 
Posts: 50,129 since Jun 2009
Thanks: 32,601 given, 98,784 received

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.

Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #7 (permalink)
 madLyfe 
Des Moines, Iowa
 
Experience: None
Platform: Ninja, TOS
Broker: AMP/CQG, TOS
Trading: CL, TF, GC
 
madLyfe's Avatar
 
Posts: 1,644 since Feb 2011
Thanks: 9,220 given, 1,016 received


Big Mike View Post
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.

Mike

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

\_(ツ)_/

(╯□)╯︵ ┻━┻
Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #8 (permalink)
 Big Mike 
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: Custom solution
Trading: Futures & Crypto
 
Big Mike's Avatar
 
Posts: 50,129 since Jun 2009
Thanks: 32,601 given, 98,784 received


madLyfe View Post
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..

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





Mike

We're here to help -- just ask

For the best trading education, watch our webinars
Searching for trading reviews? Review this list

Follow us on Twitter, YouTube, and Facebook

Support our community as an Elite Member:
https://futures.io/elite/

Visit other sites? Please spread the word about your experience with our community!
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to Big Mike for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > ADXVMA arrows in Strategy


Last Updated on November 2, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Our 12-year anniversary w/ $$,$$$ prizes (check soon)

August
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts