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)
From what I can tell, you and my support rep might not be on the same page. I have asked them to reach out to you privately so they can remote into your PC to ensure we understand your issue and that it is properly answered.
No idea, I just tried it and it happens for me too. The data box shows values for the days not plotted too.
To be honest, I'm used to Ninja's calculations/indicators starting at random times for charts and backtesting, and I sort of live with it. I shouldn't have to though.
(I actually calculate daily indicators seperately direct from the feed and keep them in files which my strategy loads. I just don't really trust Ninja to have all the right data, to know whether it's going to load new data, to pause my strat while it calculates historical, to get the right start date etc etc)
Indicators have a property known as BarsRequired. The default value of this is 20 bars. What this does is that it prevents the plotting (not calculation) of the indicator until the BarsRequired criteria is met. If you wish for the indicator to plot earlier you could add this line into the Initialize() method of the indicator:
BarsRequired = 0;
Please note that usually plotting an indicator early with 0 bars required will show an “unstable” period when the indicator values are not properly calculating yet with enough data points. For example, on the EMA of period 5, the first 5 bars would be irrelevant EMA values since they aren’t really EMAs of period 5 yet since there aren’t 5 data points available. You could also try something like the line below to avoid plotting the “unstable” period, but begin plotting earlier than 20.
That was pre-mature. Had the same problems this morning.
NT support gave me the standard;
1. We've never seen that...
2. You are the ONLY one out of 10,000 customers that have reported this ...
3. What are you doing wrong you aren't confessing...
4. Dump every thing and start over with a clean install....
Update:
They just replied that they consider the indicators I wrote in NT as "Third Party Programs" so they can't help me. Even though they are just compiled Ninja Scripts and have no DLL's.
Sheeesssh .....
I'm just a simple man trading a simple plan.
My daddy always said, "Every day above ground is a good day!"
Thanks for making this clear. I had indeed used BarsRequired for some of my MTF indicators and they do not show this behaviour.
In this case this is simply a bug of the system indicators. If you display an EMA(55) it will include 35 bars of the unstable period. If you display an EMA(5) it will cut off 15 bars of the stable period.
So, why not add this line
BarsRequired = Period;
or similar (if applicable) to all system indicators?
No no this is no good.
If you use indicators with several lengths? Should it start from the biggest?
If you have a multi timeframe strategy (5min & 1 day) and you use an indicator only for 5 min time series.
The "BarsRequired" is applied to all bar series, so if automatically it will be equal to the longest indicator (lets say you use SMA(200)) then it wont plot for 200 days!
Its more complicated then appears from the first look.
The code is part of the indicator and has no impact on other indicators. It is not applied to a bar series. The "BarsRequired" will not be equal to the indicator with the longest period, as the value of "BarsRequired" is different for each indicator. I am just talking of how to code an indicator correctly.
If you have a multi-timeframe indicator, BarsRequired must be set within that indicator, otherwise it will not work correctly. The question I asked does not relate to new indicators, as you can code them in the way you like.
SMA(200): The question is, if you want to plot false values for the SMA(200), because every value plotted earlier than for CurrentBar = 200 has nothing to do with a SMA(200). The data is not available on the chart.
So you prefer false data to no data? I prefer no data to false data!