Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

runner with onexecution update

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

    #16
    Never mind I found an extra logic that cacels the order.
    Now i need to understand why entry hasnt moved to High[1], it seems because entry condition looks for entryOrder which is not null. So do I need to cancel this order? if so onBarUpdate? or on OrderUpdate?

    if(longPrice >= GetCurrentAsk() && entryOrder == null ){
    EnterLongStopMarket(0,true, PositionSize, longPrice, "MyEntryLong");

    if(TradeRunner && entryOrderRunner == null)
    {
    EnterLongStopMarket(0,true, PositionSizeRunner, longPrice, "MyEntryLongRunner");
    }​


    -----
    Would this be the approach to cancel order so entry is based on High[1]?
    if(Position.MarketPosition == MarketPosition.Flat && IsFirstTickOfBar && entryOrder != null)
    {

    tradeLongCancelled = true;
    CancelOrder(entryOrder);
    if(TradeRunner && entryOrderRunner != null)
    {

    CancelOrder(entryOrderRunner);
    }
    }​
    Click image for larger version  Name:	image.png Views:	0 Size:	38.7 KB ID:	1311099
    Last edited by tkaboris; 07-18-2024, 05:41 AM.

    Comment


      #17
      Hello tkaboris,

      It looks like we are off topic here, if you are coding other steps now you will need to use prints to see why your logic is working in that way. Your original question was about submitting a second entry and targets, if you have other questions about moving an order or cancelling an order please make a new post and include specific details on how we can assist and how you have debugged the code up to that point. If you have otherwise resolved your original concern we can close this thread.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      43 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      124 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      65 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      42 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      46 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X