Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator reading orders

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

    Indicator reading orders

    Hello,

    I have an indicator that is reading the order from an account and its giving me the "order.LimitPrice"

    But I need to seperate short and long orders.

    Is there a syntax or a logic to have order.LimitPrice"Short" and order.LimitPrice"Long" please?

    When typing in the code then there appears in the NT-popup window only order.LimitPrice.

    Thank you!
    Tony

    #2
    Hello tonynt, thanks for your post.

    The Order object has an OrderAction property, this can be used to tell if the order was a buy or sell.

    Best regards.

    Comment


      #3
      Hello,

      yes, you can be of further assistance to me.

      When I code a bracket in the indicator with
      if(Close[0]>order.LimitPrice+ATRticks*TickSize && order.OrderAction==OrderAction.Buy) movelongorder=true;
      if(Close[0]<order.LimitPrice-ATRticks*TickSize && order.OrderAction==OrderAction.Sell) moveshortorder=true;

      will that work (the question is not about the action, I just give the bool here for the logic)? Or might there be a mess when there are short and long orders?

      I´m experiencing strange order handling and I´m not sure if this here makes sense before doing more debugging.

      Thank you!
      Tony

      Comment


        #4
        Hello tonynt, thanks for your reply.

        The code you posted seems ok, but it would take testing in the actual script to confirm this is working for you as expected. Note that the Order object also has a Name property. Giving your orders unique signal names can be helpful for identifying them at a later time.

        Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        601 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        347 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        103 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        559 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        558 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X