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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        72 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        39 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        63 views
        2 likes
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        63 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        53 views
        0 likes
        Last Post CarlTrading  
        Working...
        X