![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Saturday May 25th at 11AM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| ATM Strategies (Discretionary Trading) Support for Advanced Trade Management, AutoTrail, AutoBreakeven, Stop Strategy and Simulated Stops etc... |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Junior Member
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Hello,
I'm wanting to develop an automated order execution system that does this: 1) launch application/script from scheduled task 2) reads a CSV file to determine a desired position (e.g. /ESZ8, -100) 3) connects to brokerX and takes current inventory (e.g. /ESZ8, 0) 4) places a market order to make inventory sync with CSV (sell short 100 /ESZ8 @ market) 5) close application Is Ninja a good choice for this application? Can anybody point me in the right direction? Thanks. |
|
|
|
|
|
#2 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Hi ninjakevin,
Unfortunately that some of those steps are not available for automation through NinjaScript. NinjaScript is C# so it is very powerful, but for the advanced programming aspects of C#, we just cannot support them on the forums.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Oct 2008
Posts: 3
Thanks: 0
Thanked 0 times in 0 posts
|
Which steps are supported? I'm well versed in c# and not afraid of extending the platform. I'm trying to understand what Ninjatrader can and can't do. Thanks
|
|
|
|
|
|
#4 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
All except step 4 are outside the scope of NinjaScript. NinjaScript can place orders for you, but not any of the other stuff without some more advanced programming. Retrieval of inventory is not doable in NinjaTrader right now either.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#5 | |
|
Member
Join Date: Jul 2007
Location: steamboat, co
Posts: 52
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
int MarketPosition(string instrument, string account) -Gets the market position for an instrument/account combination. Returns 0 for flat, negative value for short positive value for long. |
|
|
|
|
|
|
#6 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
Those functions are not NinjaScript functions. They are for the DLL and COM interfaces. You will be programming outside of NinjaTrader for what you want anyways so it may work for you.
Josh
NinjaTrader Customer Service |
|
|
|
|
|
#7 | |
|
Member
Join Date: Jul 2007
Location: steamboat, co
Posts: 52
Thanks: 0
Thanked 0 times in 0 posts
|
Quote:
like Code:
Print(Position.MarketPosition.ToString() + " " + Position.Quantity.ToString()); |
|
|
|
|
|
|
#8 |
|
NinjaTrader Product Manager
Join Date: May 2007
Location: Denver, CO
Posts: 17,458
Thanks: 1
Thanked 107 times in 70 posts
|
That gets you the position direction and its quantity based off of the strategy and not your account.
Josh
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|