Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Simple moving average ea
Collapse
X
-
In reference to Post #13 (above):- How do I prevent the strategy from confusing "Historical Positions" with "Live Positions;" you suggest that I fix this by removing the strategy - then how shall I use the strategy once removed? I have tried deploying the strategy on a different instrument (one I've not used before) but the problem persists.
-
Hello Ziklag,
Thanks for your reply.
The strategy does not confuse historical with live, it simply processes your strategy according to how you wrote it, and when applied to historical data is will perform those historical trades up to the moment where live data is and is the last historical trade has not finished the strategy name will be yellow, once the last historical trade closes (based on your strategy exit conditions), the strategy color will turn green and live trades will occur.
There are 3 ways to deal with this situation:
1) Do nothing and wait until the strategy reaches the exit conditions which will close the last historical position and then the strategy will place live trades.
2) Change the strategy Start-up behavior from "wait until flat" to something else, please see the help guide here: https://ninjatrader.com/support/help..._positions.htm
3) Add a condition to your entry sets that will allow the strategy to "skip" historical data.
The condition would be:
left side: Misc>CurrentState
Center: Equals
Right side: Misc>state RealTime
Note: By adding that condition to your strategy entry sets, there will be no historical trades show/performed. If you apply the strategy to the strategy analyzer, this would prevent the analyzer from performing the analysis (unless you first remove the conditions).
Comment
-
I need help, the strategy is all green but, still, not signalling. See attached.Attached Files
Comment
-
Hello Ziklag,
Thanks for your reply.
We provide free online webinars, recorded webinars, the help guide and assistance by e-mail or on the support forums. I've already provided all of these to you.
Even though we typically do not provide step by step assistance, did you create the step by step strategy I posted for you to test with on post #15?
Please note that if you are using a live chart, keep in mind that the right edge bar is the only live bar and the bars to the left are historical. Historical trades are not made on tick by tick data rather they are made on the candle data of Open, High, Low or close. Historically the GetCurrentAsk and GetCurrentBid will be the close data of the bar. If you are looking at historical trades then i suggest that you use price low crossing below the SMA.
Comment
-
In Post #15 you said: “In addition, you will need to create an int variable in the inputs and variables section, call it LongEntryBar (or whatever you like).” So …, this goes under ‘variables’ within the ‘Input and Variables’ section – am I right? What 'Default' value do I assign it and what do I consider in assigning it any value? See attached.
Comment
-
Hello Ziklag,
Thanks for your reply.
Correct, you create variables on the input and variables page.
What default you assign a variable depends on its use, sorry I cannot be more definitive than that. In this specific case, you can leave it as 1 or set it to zero, it does not matter because eventually the variable is assigned a value.
Comment
-
Hello Ziklag,
Thank you for your post.
You can search our list of NinjaScript consultants through the link below. Simply enter a consultant name or search by using our filter categories. Once you have identified your consultants of choice, please visit each consultant's site for more information or contact them directly to learn more:
You can locate the contact information for the consultants on their direct websites for any additional questions you may have. Since these consultants are third-party services for NinjaTrader, all pricing and support information will need to be obtained through the consultant.
The NinjaTrader Ecosystem website is for educational and informational purposes only and should not be considered a solicitation to buy or sell a futures contract or make any other type of investment decision. The companies and services listed on this website are not to be considered a recommendation and it is the reader's responsibility to evaluate any product, service, or company. NinjaTrader Ecosystem, LLC is not responsible for the accuracy or content of any product, service or company linked to on this website.
Let me know if I may be of further assistance.
Thomas C.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
647 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
368 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
108 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
571 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
573 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment