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
DefaultQuantity (what is the default, and where to set it)
Collapse
X
-
Thank you for your question jack1234. According to the documentation,
Originally posted by http://ninjatrader.com/support/helpGuides/nt8/en-us/?defaultquantity.htmAn int value represents the number of contracts or shares to enter a position with. Default value is 1.
The way to enter a lot is going to be provider and account dependent. You will need to contact them to see whether 1 means "one micro lot" or "one unit".
You can not set DefaultQuantity through the strategy wizard. The attached picture shows how to use quantities other than 1.Jessica P.NinjaTrader Customer Service
-
Since different brokerages are going to have different rules as far as how quantities are specified there is no way through the Strategy Builder to create a brokerage independent strategy. If you are willing to unlock your code, this snippet will help you differentiate between connections and will in turn allow you to hard code any brokerage dependent variables.
Code:[FONT=Courier New] // http://ninjatrader.com/support/helpGuides/nt8/en-us/connection_class.htm lock(Connection.Connections) { foreach(Connection c in Connection.Connections) { Print(c.Options.Provider.ToString()); } }[/FONT]
Jessica P.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by mly916, Today, 09:48 PM
|
0 responses
6 views
0 likes
|
Last Post
by mly916
Today, 09:48 PM
|
||
Started by Mikey_, Today, 09:21 PM
|
0 responses
10 views
0 likes
|
Last Post
by Mikey_
Today, 09:21 PM
|
||
Started by cre8able, Today, 05:53 PM
|
3 responses
13 views
0 likes
|
Last Post
by cre8able
Today, 09:20 PM
|
||
Started by Aryan Kumar, Today, 09:04 PM
|
0 responses
4 views
0 likes
|
Last Post
by Aryan Kumar
Today, 09:04 PM
|
||
Started by yertle, Yesterday, 05:49 PM
|
3 responses
16 views
0 likes
|
Last Post
by Mindset
Today, 08:38 PM
|
Comment