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)
1. I want to update a EOD indicator right after the end of session vs on nextbar (session open) anyone have a script for this to happen or ideas?
2. Second issue, the following error: Indicator could not be serialized. (when saving as template)
The indicator recently had a live trend line added to it that updated per bar, since then the indicator cannot be saved as a template if the line is plotted on the chart, if its not plotted then I can save as a template.
Any ideas?
thanks
Can you help answer these questions from other members on NexusFi?
1. You need to set your indicator to CalculateOnBarClose = false, otherwise it will only update with the first tick of the new session.
2. First close the offending chart. Shutdown and restart NinjaTrader. Now add the indicator to a virgin chart (only this indicator and nothing else !) and try to save it as a template. If the problem persists, your indicator has coding errors.
3. In case that there are coding errors, please post the indicator here and I will have a look which lines of the code create the problem.
-----
1. I tried this and did not update when changed to false. Its currently programmed to update per bar, from what I can see I need it programmed to have Bars.Session.GetNextBeginEnd, but this is out of my league LOL, so will need to find a programmer to help me.
2. I fluked out and fixed this myself, a class needed switched from public to private.
Here is basic EMA code, can you alter it to do the following:
1. Continue to update on each bar
2. Update at session end
many thanks
/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Add(new Plot(Color.Orange, "EMA"));
#region Properties
/// <summary>
/// </summary>
[Description("Numbers of bars used for calculations")]
[GridCategory("Parameters")]
public int Period
{
get { return period; }
set { period = Math.Max(1, value); }
}
#endregion
}
}
Where within the EMA script does it trigger the at session end update?
For some reason this false function does not have the same affect on my indicator as it does in the EMA script I pasted here as I see the EMA does update with false inserted as you stated.