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 Mindset, 04-21-2026, 06:46 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        145 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        71 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X