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.
    BertrandNinjaTrader Customer Service

    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 RookieTrader, Today, 09:37 AM
        3 responses
        15 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by kulwinder73, Today, 10:31 AM
        0 responses
        5 views
        0 likes
        Last Post kulwinder73  
        Started by terofs, Yesterday, 04:18 PM
        1 response
        23 views
        0 likes
        Last Post terofs
        by terofs
         
        Started by CommonWhale, Today, 09:55 AM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by Gerik, Today, 09:40 AM
        2 responses
        7 views
        0 likes
        Last Post Gerik
        by Gerik
         
        Working...
        X