Go Back   NinjaTrader Support Forum > NinjaTrader 7 > Strategy Development

Strategy Development Support for the development of custom automated trading strategies using NinjaScript.

NinjaTrader
Reply
 
Thread Tools Display Modes
Old 11-09-2015, 10:34 AM   #1
kiss987
Senior Member
 
Join Date: Aug 2011
Posts: 196
Thanks: 28
Thanked 3 times in 3 posts
Default EnterLong Quantity

Hello

When I use the EnterLong method it appears that the quantity parameter is represented in lots and not in units. For example, if a lot is equal to 10,000 units and I submit EnterLong(1) ,which is the minimum, my trade will be in 10,000 units. This does not allow a lot of flexibility with the trade size. Is there a way to make the EnterLong method to accept units and not lots? If not, is there a way to change the lot size?
My broker is TradeKing.

Thanks
kiss987 is offline  
Reply With Quote
Old 11-09-2015, 11:10 AM   #2
NinjaTrader_Paul
NinjaTrader Customer Service
 
NinjaTrader_Paul's Avatar
 
Join Date: May 2014
Posts: 3,001
Thanks: 349
Thanked 716 times in 692 posts
Default

Hello kiss987,

Thanks for your post.

The lot size would be controlled by your broker and you may wish to discuss with them to verify what options they have.

The enter methods are literal and pass through what integer value is given for quantity.
NinjaTrader_Paul is offline  
Reply With Quote
Old 03-16-2017, 02:00 PM   #3
EastLondonKiwi
Member
 
Join Date: Sep 2016
Location: London
Posts: 69
Thanks: 4
Thanked 4 times in 4 posts
Default

Paul is there an update for this in NJ8?

I also would like to open a trade position in my strategy based upon a number of units rather than full Lots.

Thanks

Duncan
EastLondonKiwi is offline  
Reply With Quote
Old 03-16-2017, 02:07 PM   #4
NinjaTrader_Paul
NinjaTrader Customer Service
 
NinjaTrader_Paul's Avatar
 
Join Date: May 2014
Posts: 3,001
Thanks: 349
Thanked 716 times in 692 posts
Default

Hello Duncan,

Thanks for your post.

The broker is still the answer for live accounts.

You can review all of the forex lot size details here: http://ninjatrader.com/support/helpG...with_forex.htm
NinjaTrader_Paul is offline  
Reply With Quote
Old 03-16-2017, 02:37 PM   #5
EastLondonKiwi
Member
 
Join Date: Sep 2016
Location: London
Posts: 69
Thanks: 4
Thanked 4 times in 4 posts
Default

Paul

I have read the reference material and I am still not very clear. Please clarify if my thinking is correct.

I open the chart trade. I then use the buy Mkt button with the Order qty set to 10,000. I have just placed a potion valued at 1 mini Lot correct?

By placing an order with the order qty set to 100,000, I have just placed a position for 1 full Lot correct?

So using "EnterLong(1, "NameOfTarde"); in a strategy, are you saying I can only enter position sizes of Full Lots?

If yes why does Chart Trader allow smaller positions?

If no what is the correct stagey syntax to achieve a position of 10,000 units
EastLondonKiwi is offline  
Reply With Quote
Old 03-17-2017, 08:39 AM   #6
NinjaTrader_Paul
NinjaTrader Customer Service
 
NinjaTrader_Paul's Avatar
 
Join Date: May 2014
Posts: 3,001
Thanks: 349
Thanked 716 times in 692 posts
Default

Hello Duncan,

What datafeed/broker do you use for forex?
NinjaTrader_Paul is offline  
Reply With Quote
Old 03-17-2017, 08:41 AM   #7
EastLondonKiwi
Member
 
Join Date: Sep 2016
Location: London
Posts: 69
Thanks: 4
Thanked 4 times in 4 posts
Default

FXCM via NinjaTrader Brokerage.

however that does not speak to the question?
EastLondonKiwi is offline  
Reply With Quote
Old 03-17-2017, 11:44 AM   #8
NinjaTrader_Paul
NinjaTrader Customer Service
 
NinjaTrader_Paul's Avatar
 
Join Date: May 2014
Posts: 3,001
Thanks: 349
Thanked 716 times in 692 posts
Default

Hello Duncan,

Thanks for your reply.

You can set the unit quantity in the strategy.
NinjaTrader_Paul is offline  
Reply With Quote
Old 03-17-2017, 11:55 AM   #9
EastLondonKiwi
Member
 
Join Date: Sep 2016
Location: London
Posts: 69
Thanks: 4
Thanked 4 times in 4 posts
Default

Ok??? then what is the purpose of the "quantity" parameter of the EnterLong method. Your instruction manual seems to suggest it is for the purpose of setting the order quantity?

If the order quantity is not a Lot size control, what is it?

If quantity is a Lot size control, why have you limited it to full Lots?
EastLondonKiwi is offline  
Reply With Quote
Old 03-17-2017, 12:27 PM   #10
EastLondonKiwi
Member
 
Join Date: Sep 2016
Location: London
Posts: 69
Thanks: 4
Thanked 4 times in 4 posts
Default

Paul

Apologies. I misread your answer.
Quote:
You can set the unit quantity in the strategy
.

if I understand you correctly, 10,000 as a number in the quantity parameter is in units not Lots?

And if I wanted to submit an order of a one full lot the quantity parameter would need to be 100,000?
EastLondonKiwi is offline  
Reply With Quote
Old 03-17-2017, 12:35 PM   #11
NinjaTrader_PatrickH
NinjaTrader Customer Service
 
NinjaTrader_PatrickH's Avatar
 
Join Date: Jul 2011
Location: Denver, CO
Posts: 10,537
Thanks: 748
Thanked 1,792 times in 1,727 posts
Default

Hello EastLondonKiwi,

Thank you for your response.

That is correct, you would 100,000 for 1 lot in the Chart Trader and the Strategies.

Please let me know if you have any questions.
NinjaTrader_PatrickH is offline  
Reply With Quote
The following user says thank you to NinjaTrader_PatrickH for this post:
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Variable EnterLong Position Quantity fercho Strategy Development 6 01-14-2015 05:09 AM
Problem with OnExecution multiple quantity order using EnterLong(quantity,signalName) FattMatt4088 Strategy Development 7 09-05-2013 08:26 AM
EnterLong(100000) vs. EnterLong() problem nicknamed Platform Technical Support 2 03-22-2010 08:41 AM
Close quantity more than entry quantity binwang2 General Development 3 02-11-2010 01:57 PM
EnterLong quantity 0 gg80108 Strategy Development 4 11-18-2009 09:07 AM


All times are GMT -6. The time now is 12:51 AM.

Futures, foreign currency and options trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Risk capital is money that can be lost without jeopardizing ones financial security or lifestyle. Only risk capital should be used for trading and only those with sufficient risk capital should consider trading. Past performance is not necessarily indicative of future results. View Full Risk Disclosure.

CFTC Rules 4.41 - Hypothetical or Simulated performance results have certain limitations, unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, such as lack of liquidity. Simulated trading programs in general are also subject to the fact that they are designed with the benefit of hindsight. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.

This website is hosted and operated by NinjaTrader, LLC (“NT”), a software development company which owns and supports all proprietary technology relating to and including the NinjaTrader trading platform. NT is an affiliated company to NinjaTrader Brokerage (“NTB”), which is a NFA registered introducing broker (NFA #0339976) providing brokerage services to traders of futures and foreign exchange products. This website is intended for educational and informational purposes only and should not be viewed as a solicitation or recommendation of any product, service or trading strategy. No offer or solicitation to buy or sell securities, securities derivative or futures products of any kind, or any type of trading or investment advice, recommendation or strategy, is made, given, or in any manner endorsed by any NT affiliate and the information made available on this Web site is not an offer or solicitation of any kind. Specific questions related to a brokerage account should be sent to your broker directly. The content and opinions expressed on this website are those of the authors and do not necessarily reflect the official policy or position of NT or any of its affiliates. 

Vendors along with their websites, products and services, collectively referred to as (“Vendor Content”), are independent persons or companies that are in no manner affiliated with NT or any if its affiliates. NT or any of its affiliates are not responsible for, do not approve, recommend or endorse any Vendor Content referenced on this website and it’s your sole responsibility to evaluate Vendor Content. Please be aware that any performance information provided by a vendor should be considered hypothetical and must contain the disclosures required by NFA Rule 2-29(c). If you are interested in learning more about, or investigating the quality of, any such Vendor Content you must contact the vendor, provider or seller of such Vendor Content. No person employed by, or associated with, NT or any of its affiliates is authorized to provide any information about any such Vendor Content. Visit the CFTC resources for education regarding the industry and signs of fraud.