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 jclose, Today, 09:37 PM
        0 responses
        6 views
        0 likes
        Last Post jclose
        by jclose
         
        Started by WeyldFalcon, 08-07-2020, 06:13 AM
        10 responses
        1,414 views
        0 likes
        Last Post Traderontheroad  
        Started by firefoxforum12, Today, 08:53 PM
        0 responses
        11 views
        0 likes
        Last Post firefoxforum12  
        Started by stafe, Today, 08:34 PM
        0 responses
        11 views
        0 likes
        Last Post stafe
        by stafe
         
        Started by sastrades, 01-31-2024, 10:19 PM
        11 responses
        169 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X