NinjaTrader Support Forum  
X

Attention!

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


Go Back   NinjaTrader Support Forum > Application Technical Support > ATM Strategies (Discretionary Trading)

ATM Strategies (Discretionary Trading) Support for Advanced Trade Management, AutoTrail, AutoBreakeven, Stop Strategy and Simulated Stops etc...

Reply
 
Thread Tools Display Modes
Old 04-12-2012, 03:15 AM   #1
everington_f
Member
 
Join Date: Nov 2008
Posts: 72
Thanks: 9
Thanked 0 times in 0 posts
Default Advanced Order Management Code Question

instead of simply selling 500 contracts is there NT functionality using getcurrentbidvolume and getcurrentask to allow:

Join current ask for 500 lots

then sequentially sell into the current bid volume whilst reducing my offer size on the getcurrentask so that i cannot exceed a 500 lot short position if that gets lifted?

For example:

join current ask for 500 lots @2555
sell into bid sizes at 2554 short 100, 150, 100, 150

which reduces my ask volume so:
sell@getcurrentaskorder volume to 400, 250, 150, 0

Regards and thanks for feedback to this brain teaser...

F Everington
everington_f is offline  
Reply With Quote
Old 04-12-2012, 03:32 AM   #2
NinjaTrader_Bertrand
NinjaTrader Customer Service
 
NinjaTrader_Bertrand's Avatar
 
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
Default

F Everington, this could be coded up for example in an automatic NinjaScript strategy but would not be available as function for manual / discretionary order entry via SuperDOM or ChartTrader.
NinjaTrader_Bertrand is offline  
Reply With Quote
The following user says thank you to NinjaTrader_Bertrand for this post:
Old 04-19-2012, 02:15 PM   #3
everington_f
Member
 
Join Date: Nov 2008
Posts: 72
Thanks: 9
Thanked 0 times in 0 posts
Default

Ok thanks. for example this basic code on barupdate

{
EnterShort(GetCurrentAskVolume(), "Short1");
}

NT has GetCurrentAskVolume() as a long, it need to be an int to attach it to EnterShort. Do you have an example of how to make that conversion in Variables?

Regards and thanks
everington_f is offline  
Reply With Quote
Old 04-19-2012, 04:01 PM   #4
NinjaTrader_RyanM
NinjaTrader Customer Service
 
NinjaTrader_RyanM's Avatar
 
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
Default

Hi everington_f,

You can cast it as integer with this:

EnterShort((int)GetCurrentAskVolume(), "Short1");
NinjaTrader_RyanM is offline  
Reply With Quote
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
Money management code pjimmyinahouse General Programming 6 11-28-2012 01:27 PM
What would be the best way to code a trade management? kaywai General Programming 1 09-14-2011 02:47 AM
Money Management Code Examples RedEye General Programming 1 11-27-2010 12:24 AM
**advanced C# Question** funk101 Miscellaneous Support 1 05-25-2009 08:47 AM
Trailing Stop using Advanced Order Management dbw451 Strategy Analyzer 7 01-28-2009 07:41 AM


All times are GMT -6. The time now is 09:20 PM.