Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Major Differences Between Live and Simulation In Strategy Function

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

    #16
    Hello Jesse, thank you for your reply.

    No, the Exit is not attempting to scale out of the market. It's intended to serve as a reverse to my prior position and the Exit is submitted on one and the same price level, that's why I'm using the calculation (Position.Quantity * 2). The strange thing is that my Prints are showing the correct value of 4 with this calculation, in a scenario where my position size is 2. But adding that same calculation to my Exit doesn't seem to give me a value of 4, and instead returns me a value of 2.

    A few days ago I did not check for Null when submitting "ASL1", the Exit order, and what would happen is that the strategy would submit 2 contacts first, and then another 2 contracts on the second price movement (Calculation set to .OnPriceChange), instead of submitting all 4 contracts at once. Then I added the "ASL1 == null" in my If statement, and now it seems like the strategy is no longer submitting the second 2 contracts that would make up the total of 4 that I am trying to get.

    I haven't had a chance yet to test different setups the markets are still open and I have other strategies running that are preventing me from trying the Simulated Data Feed where I can purposely trigger the scenario to see different outcomes depending on different factors in my script.

    Comment


      #17
      Hello GLFX005,

      I re reviewed the prior information with these details however I am not certain what the problem would be with the given details. I would likely need a more specific example here that shows the entry and the target logic so I can get a better idea of what would be expected for the target.

      As a test you could try changing the logic to have hard coded values, instead of Position.Quantity * 2 just use 4 and see if that works right. If not this likely relates somehow to the situation in total.

      I look forward to being of further assistance.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      52 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      130 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      70 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      44 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      49 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X