This is the base scenario that must be confirmed to work first. If you are looking at different bars there is no reason to even proceed into anything with data manipulation.
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
Problems with indicator & strategy in RealTime
Collapse
X
-
EMA integrates DataSeries objects which is unnecessary at this point in time. The root issue you want to discover is if your system is actually processing different bars and to do that is easily seen if you print CurrentBar from the indicator and the strategy along with timestamps for each.
This is the base scenario that must be confirmed to work first. If you are looking at different bars there is no reason to even proceed into anything with data manipulation.Josh P.NinjaTrader Customer Service
-
Hey -- after modifying my strategy and indicator and printing currentbar, it doesn't really give any useful info.
Can i assume you mean that this is useful only if I am calling the indicator FROM my strategy? Because right now i am running them individually (e.g. the indicator is running on a chart)
thanks
Comment
-
You need to run them from the strategy for an apples to apples comparison.
The only other comparison that would work is just to do something like an SMA indicator on the chart and print SMA values from strategy. You will see they match timestamps with SMA values perfectly.Josh P.NinjaTrader Customer Service
Comment
-
If i were to use the SMA for the example, it would not be applied against my dataset, and frankly i think the dataset is part of the problem.
I am just going to switch everything over this weekend to call the indicator from my strategy and see if that fixes it. I have a feeling that will work-around this issue for some reason.
I will reply with the results.
Comment
-
I just went and re-read the beginning of this thread now that I understand my problem a little bit better. Looks to me like it is identical to what the original author reported, which was acknowledged as some sort of platform bug.
I will follow the original recommendation and move this stuff into an indicator which I call from the strategy. Will reply if that fixes it.
Comment
-
I modified my strategy to remove the ERG calculation logic and instead I am now calling an indicator containing that logic to get the values. After making this change, the values appear to be calculated correctly both in real time and historical processing.
I will 100% confirm this tomorrow but I am more or less positive it is now working.
I think it's pretty conclusive that there is some problem with dataseries oriented calculations in strategies when transitioning from historical to real time data. I don't know if this is limited to certain indicators (such as EMA) or if it is a broad based problem affecting all indicators. All I know is the exact same logic fails to calculate properly in a strategy but then works properly once placed into an indicator. The original author of this thread also clearly experienced the same issue
In any case, I am happy to have a working solution/work-around and will consider this issue closed from a support perspective.
Thanks,
Brandon
Comment
-
This is confirmed to work 100%. I can't tell you how nice it is to see live results that actually match backtest results and do what they are supposed to do. I realize now that this wackiness has been killing several variants of this strategy for months.
br
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by TheTechnician86, Today, 05:47 PM
|
0 responses
8 views
0 likes
|
Last Post Today, 05:47 PM | ||
Started by Ryan333, Today, 05:25 PM
|
0 responses
3 views
0 likes
|
Last Post
by Ryan333
Today, 05:25 PM
|
||
Started by hsammons87, Today, 05:21 PM
|
0 responses
5 views
0 likes
|
Last Post
by hsammons87
Today, 05:21 PM
|
||
Started by Gmonte, 10-01-2022, 08:28 AM
|
2 responses
190 views
0 likes
|
Last Post Today, 04:42 PM | ||
Started by ETFVoyageur, 05-18-2024, 12:45 AM
|
5 responses
32 views
0 likes
|
Last Post
by ETFVoyageur
Today, 04:07 PM
|
Comment