Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Advanced Order Management Code Question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    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

    #2
    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.

    Comment


      #3
      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

      Comment


        #4
        Hi everington_f,

        You can cast it as integer with this:

        EnterShort((int)GetCurrentAskVolume(), "Short1");
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by NullPointStrategies, Yesterday, 05:17 AM
        0 responses
        54 views
        0 likes
        Last Post NullPointStrategies  
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        130 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        72 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        44 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        49 views
        0 likes
        Last Post TheRealMorford  
        Working...
        X