![]() |
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 |
|
Member
Join Date: Nov 2008
Posts: 72
Thanks: 9
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#2 |
|
NinjaTrader Customer Service
Join Date: Sep 2008
Location: Germany
Posts: 22,411
Thanks: 252
Thanked 976 times in 959 posts
|
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.
Bertrand
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Bertrand for this post: |
|
|
|
#3 |
|
Member
Join Date: Nov 2008
Posts: 72
Thanks: 9
Thanked 0 times in 0 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Sep 2009
Location: Denver, CO
Posts: 8,117
Thanks: 249
Thanked 418 times in 415 posts
|
Hi everington_f,
You can cast it as integer with this: EnterShort((int)GetCurrentAskVolume(), "Short1");
Ryan M
NinjaTrader Customer Service |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
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 |