Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Custom columns to operate on EOD data
Collapse
X
-
Hello Acheron,
Thank you for your patience.
The Market analyzer is is based on real-time tick data. There must be a tick in real-time for the indicator or column to calculate. End Of Day feeds would not receive ticks through out the day.
I have forwarded this to development for consideration to allow accessing the last closed value in the Market Analyzer.
Leave a comment:
-
Hello Acheron,
I am not sure what the reason is that the indicator's will not plot on the EOD data until an update is received. I am checking with development and will follow up here.
Leave a comment:
-
Thanks Patrick.
Due to several vital improvements (as well as some "quality of life" additions) of NT 8beta over the NT 7, I am solely using NT 8beta.
To pull the EOD close price for each instrument within the Market Analyzer I tried the following for the NinjaTrader.NinjaScript.MarketAnalyzerColumn:
Code:namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns { public class CustomClosePriceColumn : MarketAnalyzerColumn { protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Output the close price of last bar."; Name = "CustomClosePriceColumn"; Calculate = Calculate.OnPriceChange; IsDataSeriesRequired = true; } else if (State == State.Realtime) { if (Instrument != null && Instrument.MarketData != null && Instrument.MarketData.LastClose != null) CurrentValue = Instrument.MarketData.LastClose.Price; } } protected override void OnBarUpdate() { CurrentValue = Close[0]; } } }
Code:Similarly, to achieve the same with the NinjaTrader.NinjaScript.Indicator I did the following: namespace NinjaTrader.NinjaScript.Indicators { public class CustomClosePriceIndicator : Indicator { protected override void OnStateChange() { if (State == State.SetDefaults) { Description = @"Output the close price of last bar."; Name = "CustomClosePriceIndicator"; Calculate = Calculate.OnPriceChange; IsSuspendedWhileInactive = true; } } protected override void OnBarUpdate() { Value[0] = Close[0]; } } }
Unfortunately, although the MarketAnalyzerColumn seems to populate, the Indicator column is full of "...". Is there any reason for that?Last edited by Acheron; 08-17-2016, 01:02 PM.
Leave a comment:
-
Hello Acheron,
Thank you for your post and welcome to the NinjaTrader Support Forum!
If you are using NinjaTrader 7 you can create custom indicators that you add to the Market Analyzer as Columns > Indicator. Then use work arounds such as the SMA(1) for the values you need. For example: MyPlot.Set(SMA(Close, 1)[0]); and MyPlot.Set(SMA(Volume, 1)[0]);
In NinjaTrader 8 you can create custom columns but likely would still need a custom indicator to pull the values on EOD data.Last edited by NinjaTrader_PatrickH; 08-17-2016, 01:35 PM.
Leave a comment:
-
Custom columns to operate on EOD data
Hi,
I would like to add 3 custom columns which would show the close price, volume, and price x volume in order to filter out instruments that do not meet certain conditions.
I am currently using the free Yahoo EOD data connection for the ASX market.
Unfortunately, the Last Close column will not populate with Yahoo EOD data, and I remember reading that this is due to absence of a real-time data connection (Even though historical data shows that daily OHLCV data is being pulled from Yahoo). I am aware that it is possible to use SMA(1) indicator to give me the last close price. However, I would like to avoid doing this in order to further familiarize myself with creating custom ninjascript (I have some experience in C programming). Additionally, it seems that there is no way to operate on the output shown in columns (excel-style), without creating a custom indicator.
Therefore, my question is: what would be the best approach to attain the above-mentioned 3 columns for my EOD data?Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DayTradingDEMON, Yesterday, 02:10 PM
|
6 responses
39 views
0 likes
|
Last Post
![]()
by rockmanx00
Today, 05:09 PM
|
||
Started by Pointtoni, Yesterday, 11:41 PM
|
3 responses
35 views
0 likes
|
Last Post
![]()
by jenacie.com
Today, 12:47 PM
|
||
Started by Nate G, 03-17-2025, 02:53 PM
|
4 responses
72 views
1 like
|
Last Post
![]()
by timko
Today, 11:13 AM
|
||
Started by several, 03-18-2025, 03:53 AM
|
11 responses
184 views
1 like
|
Last Post
![]()
by timko
Today, 10:53 AM
|
||
Started by Amelie4262, Today, 10:45 AM
|
0 responses
14 views
0 likes
|
Last Post
![]()
by Amelie4262
Today, 10:45 AM
|
Leave a comment: