Thanks on advance.
Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Saving data before and after f5
Collapse
X
-
Saving data before and after f5
Hey guys, im developing an indicator in which i draw a couple of things in a chart, according to OrderFlowCumulativeDelta and a couple of other indicators. OrderFlowCumulativeDelta only works on the last bars in the chart upon a refresh or opening a new chart (i think), because my datafeed doesn't support historical stamped tick data. However i often refresh or add/remove indicators, and all my drawings get erased, and do not get redrawn since the data they used is now lost. I was wondering if there was any other solution other than saving the coordinates of the drawn objects in a file at chart.close and reading them on a chart.open, because this seems fairly complex and would probably take me a couple days.
Thanks on advance. -
Hello Iau Stormtech,
Thank you for your post.
To plot historically with Delta type Bid Ask requires historical bid ask stamped tick data. You can select to record incoming live data as historical data and this may help with your issue. To record incoming live data as historical, go to Tools > Options > Market Data > Check "Record Live Data As Historical".
Please let us know if we may be of further assistance to you.
Kate W.NinjaTrader Customer Service
-
Hey Kate, Thanks for the reply. If that worked that would be awesome, however i can't seem to get it to work. I've tried recording live data as historical, but i see no change in the Order Flow Cumulative Delta indicator. I am attaching screenshots of the dataseries and the indicator settings I'm using, the datafeed is coinbase.com
Comment
-
Hello lauStormtech,
Thank you for your reply.
Coinbase can use NinjaTrader's historical data servers which would provide historical tick data for BTCUSD. Please check to ensure that under Connections > Configure > your Coinbase connection that the box is checked next to NinjaTrader Historical Data server is checked.
Thanks in advance; I look forward to assisting you further.
Kate W.NinjaTrader Customer Service
Comment
-
Hey Kate, I have that setting on, but it still doesn't work. However, I realized Order Flow Cumulative Delta works properly when i have set the dataseries as type: Tick. With this, I can use it in my indicator by adding another DataSeries of type tick, and setting the indicator Order Flow Cumulative Delta to read from that dataseries. However, I'm not 100% sure on how to achieve this. I will probably figure it out, but if you know how to do it, I would appreciate it. This is the code i have right now
Code:else if (State == State.Configure) { AddDataSeries(Data.BarsPeriodType.Tick, 1); } else if (State == State.DataLoaded) { this.cumulativeDelta = OrderFlowCumulativeDelta(CumulativeDeltaType.BidAsk, CumulativeDeltaPeriod.Bar, 0); } . . . protected override void OnBarUpdate() { if (BarsInProgress == 0) { //code to draw according to cumulative delta } else if (BarsInProgress == 1) { cumulativeDelta.Update(cumulativeDelta.BarsArray[1].Count - 1, 1); } }
Comment
-
Kate W.NinjaTrader Customer Service
Comment
-
Ok, so I've finally figured out the problem. When i add the dataseries, it takes the same 'barstoload' as the original dataseries of the chart. Because that dataseries is of a different timescale (1 tick vs lets say 200 range) this results in only getting data for a fraction of the chart. So, when i add a dataseries I want it to take data as far back as the beginning (most-left) part of the chart. Is this possible?
Comment
-
Hello Iau Stormtech,
Thank you for your reply.
I would suggest loading the data based on days to load instead of bars to load. That way it will load the full chart of data for the added data series as well.
Please let us know if we may be of further assistance to you.Kate W.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by algospoke, Yesterday, 06:40 PM
|
2 responses
19 views
0 likes
|
Last Post
by algospoke
Today, 07:04 PM
|
||
Started by ghoul, Today, 06:02 PM
|
3 responses
14 views
0 likes
|
Last Post Today, 06:43 PM | ||
Started by jeronymite, 04-12-2024, 04:26 PM
|
3 responses
44 views
0 likes
|
Last Post
by jeronymite
Yesterday, 10:10 PM
|
||
Started by Barry Milan, Yesterday, 10:35 PM
|
7 responses
20 views
0 likes
|
Last Post Today, 06:16 PM | ||
Started by AttiM, 02-14-2024, 05:20 PM
|
10 responses
180 views
0 likes
|
Last Post
by jeronymite
Today, 06:11 PM
|
Comment