want to get chart info in initialize() - futures io
futures io futures trading



want to get chart info in initialize()


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one tulanch with 4 posts (0 thanks)
    2. looks_two Big Mike with 2 posts (1 thanks)
    3. looks_3 Fat Tails with 2 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 3,063 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 8 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
 

want to get chart info in initialize()

(login for full post details)
  #1 (permalink)
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
 
Posts: 250 since Mar 2010
Thanks: 49 given, 368 received

Hello all

I want to obtain the type of chart and the period of the chart in the initialize() method.

for example PeriodType.Minute and a period of 1

I can get the Instrument name, but uncertain of to get the others. Any ideas?

I do not think there are any documented ways to do this.

My ultimate goal is to make use of the Add() method using the current chart's details and you can only use the Add() method in the initialize() method.

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
What blockvolume is visible? - order processing
NinjaTrader
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
How to implement this?
MultiCharts
MACD line not plotting after change of plot order
NinjaTrader
 
 
(login for full post details)
  #3 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


I think there is a clear answer. The properties of the bars cannot be accessed in the Initialize() section.


BarsPeriod, BarsPeriods


Excerpt from the NinjaTrader User Manual.

NOTE: This property should NOT be accessed within the Initialize() method.


If you want to adapt the period of an added instrument to the period type and period of the chart, this can only be achieved by a user defined input.


What do you need this for?

Reply With Quote
 
(login for full post details)
  #4 (permalink)
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
 
Posts: 250 since Mar 2010
Thanks: 49 given, 368 received

wanted to Add() .Ask, .Bid, and .Last of current chart settings...

fyi, the "should not" is really "can not"... as doing so won't run, arfgs message in output window indicating so...

Started this thread Reply With Quote
 
(login for full post details)
  #5 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,731 received


tulanch View Post
wanted to Add() .Ask, .Bid, and .Last of current chart settings...

fyi, the "should not" is really "can not"... as doing so won't run, arfgs message in output window indicating so...

You can only access one DataSeries of a chart. This can either be the last traded price, the bid or the ask.

The accessed DataSeries is automatically added to your indicator, as it is selected via the indicator dialogue box, so you do not need to add it.

I still do not get exactly, what you try to achieve.

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
 
Posts: 250 since Mar 2010
Thanks: 49 given, 368 received

I have been experimenting with adding in the Bid and Ask data series to Delta type indicators.

Doing so provides history data when you refreash - meaning Delta type indicators still have Bid Ask data to calculate with and this is all done without needing an external file to hold the Bid Ask data as is the case with GEOM and others.

I was thinking to keep the Bid Ask data series it in the same Chart Type (Minute, Range, Volume, etc) and same Period to keep coding easier... but since it's proving difficult to get the current charts values gona forgo that.

I then tried settings of Tick and 1, but it I have noticed that refreshes are not providing the same Bid Ask data as OnMarketData does. Something about "non-last-qualifying trade"....

so I keep plugging along...

Started this thread Reply With Quote
 
(login for full post details)
  #7 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received


tulanch View Post
I have been experimenting with adding in the Bid and Ask data series to Delta type indicators.

The bid and ask dataseries are not synchronized with the Last, so basically worthless.

To get true persistence of bid/ask data with NT, you'll need the GomRecorder framework.



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/
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:
 
(login for full post details)
  #8 (permalink)
Salt Lake City, UT
 
Experience: Intermediate
Platform: SC, NT, MT
Broker: AMP
Trading: NQ ES YM Bonds
 
Posts: 250 since Mar 2010
Thanks: 49 given, 368 received

True that, I'm not even concerned about being synchronized, just magnitude, and as you pointed out these are not too useful. One would think that you could align the magnitude of the values returned say from Bid with the manually recorded value from onmarketdata in realtime/playback for a given period of time/volume/tick. But they simply do not. I was told it was due to non-last-qualifying trades. Google that one, it will make you question datafeeds in general. But back to this point, it does not make sense that my datafeed coming in is "correct" and the data that is captured historically (I assume that's what the dataseries does) is different. Yea there may be some architectural reason, but fundamentally that historical data (if that what it was designed to be) is wrong. Sure would be convenient if these worked as I portray they should - but most likely they are working as designed for reasons I don't fully understand.

Started this thread Reply With Quote
 
(login for full post details)
  #9 (permalink)
Site Administrator
Swing Trader
Data Scientist & DevOps
Manta, Ecuador
 
Experience: Advanced
Platform: My own custom solution
Trading: Emini Futures
 
Big Mike's Avatar
 
Posts: 49,785 since Jun 2009
Thanks: 32,314 given, 97,581 received

Look here for an in-depth data feed comparison of bid/ask data:



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/
Follow me on Twitter Visit my futures io Trade Journal Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > want to get chart info in initialize()


Last Updated on December 24, 2011


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, 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