Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Syntax Problems
Collapse
This topic is closed.
X
X
-
I have just applied my strategy to a 100 tick USDJPY chart and realized that the quantity designation in the strategy (ctr) was set to 1 which is OK for Tradestation but not for Gain which uses 100000. I went back to the code but cannot change anything. (Nothing responds.)
Although the settings show 1 for ctr, there is a notation that the ctr setting is setup in the code.
Any reason why the code doesn't respond to changes to input variable?
Comment
-
Not sure what you are referring to. If your system is locked up you will need to restart it. Please see the GAIN connection guide on setting up your GAIN connection properly. http://www.ninjatrader.com/webnew/support_GAIN.htm
If you have follow up questions not related to programming please open up a new thread or send an email to support [at] ninjatrader [dot] com. Thank you. It helps us keep the forums organized and searchable for other users.Josh P.NinjaTrader Customer Service
Comment
-
Sim101 Strategy Reports
1-My strategy is now running in Sim101. The input variable Ctr (for number of contracts) is set in the code as 10000. In the running strategy, it seems to be set at 1. How do I resolve?
2-In the Control Center, the following info is provided:
ORDERS tab: shows 9 filled orders
STRATEGIES tab shows 13 items: 8 transactions, 7 of which show no unrealized or
realized profit, 1 open and updating.
EXECUTIONS tab shows 9 executions
POSITIONS tab shows 1 open position
ACCOUNTS tab shows Buying Power 199999, Cash Value 99999, Excess Equity
199999, Initial Margin 0.
ACCOUNT PERFORMANCE tab shows 2 trades, 1 long, 1 short
Why does the STRATEGIES page show no realized or unrealized profit?
Why does the ACCOUNTS tab not show current buying power? (1 position is still open)?
Why does the ACCOUNT PERFORMANCE tab not show all 8 closed trades?
Comment
-
1. If you didn't create it as a user definable parameter it is not going to do anything. If you did not specify your entry orders to use Ctr it is going to default to 1 depending on the instrument type you are running on.
2. Strategies tab shows only information based on your strategy position as you are running a strategy.
Accounts tab shows you buying power only for realtime trades that are not simulated.
Accounts performance only shows you realtime trades that are not simulated. You are likely looking at a simulated strategy position.
If you do not mind Stan, please open a new thread in the forum for questions not related to the original syntax problems discussed earlier on this thread.Josh P.NinjaTrader Customer Service
Comment
-
Hi skat100,
you can also try letting your strategy run with CalculateOnBarClose set to false, this will update the Close tick by tick when running realtime.
Yes, declare Price in the Variables() section and you can use it to store your custom execution level and insert into your order generation code.
Please also see this link - http://www.ninjatrader-support.com/H...BarClose1.html
Comment
-
Please see this article: http://www.ninjatrader-support.com/H...romAChart.htmlJosh P.NinjaTrader Customer Service
Comment
-
Thanks for the reference articlses. I have a USDJPY chart open and there are trades printed. However, the last bar is December 10. The strategy icon is greyed out.
I assume this means I am not connected to a broker. I believe I have a Sim 101 account.
My broker is Gain Capital.
How do I get my Sim101 account working?
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
612 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
355 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
105 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
561 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
564 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment