Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Position status and position qty when flat are not identified well

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

    Position status and position qty when flat are not identified well

    hi

    i created new superdom columns script

    which works fine

    however within this script i wrote :


    protected override void OnPositionUpdate(PositionEventArgs positionUpdate)
    {



    Print("MarketPosition " + positionUpdate.Position.MarketPosition.ToString()) ;

    Print(" position QTY" + positionUpdate.Position.Quantity.ToString());


    }

    if found that when i enter position with 1 contract long

    MarketPosition is long and position QTY is 1

    when i increase position i.e. buy one more contract

    MarketPosition is long and position QTY is 2

    when i exist 1 contract ( decrease position )

    MarketPosition is long and position QTY is 1

    so far all is good

    BUT !!

    when i exist 1 contract more ( decrease position , expect to become flat )

    MarketPosition is long and position QTY is 1

    i.e. when position is accually flat it is reported as long with quantity 1

    i want to make clear that the super dom report on position as it should
    but inside my script the position situation is not identified correctly

    #2
    Hello doron,

    Thank you for your post.

    How are you checking the Position and Quantity in the script? In what method are you checking the values? Is this on the execution report in OnExecutionUpdate()?

    Do you have a sample script or a piece of code we may test on our end to see the same behavior?

    Comment


      #3
      as i wrote
      i print in the script
      and compair results to DOM
      and i know when i am flat or not

      Comment


        #4
        Hello doron,

        As you have not supplied any code I cannot say anything other then what I previously posted. I would add that you can look to the Super Dom Columns methods, but I assume you are already using these?

        Comment


          #5
          the code was and is still in the 1st post i published
          just copy and past it

          Comment


            #6
            Thanks doron,

            You would want to use positionUpdate.MarketPosition. This will pull the position of the account rather than the Position object and then the MarketPosition. I will forward to Product Management as they are updating the documentation.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by judysamnt7, 03-13-2023, 09:11 AM
            4 responses
            59 views
            0 likes
            Last Post DynamicTest  
            Started by ScottWalsh, Today, 06:52 PM
            4 responses
            36 views
            0 likes
            Last Post ScottWalsh  
            Started by olisav57, Today, 07:39 PM
            0 responses
            7 views
            0 likes
            Last Post olisav57  
            Started by trilliantrader, Today, 03:01 PM
            2 responses
            21 views
            0 likes
            Last Post helpwanted  
            Started by cre8able, Today, 07:24 PM
            0 responses
            10 views
            0 likes
            Last Post cre8able  
            Working...
            X