Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

ByStrategyPosition vs PerEntryExecution issue

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

    ByStrategyPosition vs PerEntryExecution issue

    Hello,

    I am using managed approach in my strategies. I have a question about “Stop & target submission” property within custom strategy.

    My understanding is that if I set the property to “ByStrategyPosition” and get partial fills on the order of 10 contracts (let’s say 1, 1 and 8), I should only have 1 stop loss resting order with qty 10 and 1 profit take resting order with qty 10. If I choose “PerEntryExecution”, the resting stop loss and take profit will mimic the way partial order was filled (1, 1 and 8). My strategy only submits SL and Take Profit after all contracts are filled (entryOrder.Filled == entryOrder.Quantity)

    Is my understanding correct?

    I was testing this property on Sim account, and even though I had property set to “ByStrategyPosition”, I still got 1,1 and 8 resting orders for both stop loss and take profit.

    Thanks,
    redduke

    #2
    Hello RedDuke,

    Thank you for your post.

    You are correct in your understanding. The only item here is when the strategy position updates and that partial fills will update the position. So ByStrategyPosition means that when the position updates it will generate the Stop Loss and Profit Target. Some people prefer that this occur on the execution event rather than the position update, so the option PerEntryExecution is available.

    Please let me know if you have any questions.

    Comment


      #3
      Hi Patrick,

      Thanks for confirming it. Why did I get multiple stop loss and take profits then?

      My logic runs as follows. Once I get a fill, I wait for the whole order to get filled (entryOrder.Filled == entryOrder.Quantity), then wait for 2 more seconds and then send my stop loss and take profits orders.

      This morning, I got a partial fill for qty of 10 in a way of 1, 1 and 8 for a Sim account. When I submitted stop loss and take profit they were placed as 1, 1 and 8, instead of 10.

      Thanks

      Comment


        #4
        Hello RedDuke,

        Thank you for your response.

        I would need to review the strategy it self and the executions that were seen through your Log and Trace files.

        Comment


          #5
          where can i email it to?

          Comment


            #6
            Hello RedDuke,

            Thank you for your response.

            Please send me your log and trace files for today so that I may look into what occurred.

            You can do this by going to the Control Center-> Help-> Mail to Platform Support.

            You can also attach the strategy, which is found under (My) Documents\NinjaTrader 7\bin\Cusotm\Strategy.

            Please reference this thread in the e-mail: http://ninjatrader.com/support/forum...ad.php?t=77800

            Comment


              #7
              Just emailed everything.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by GussJ, 03-04-2020, 03:11 PM
              16 responses
              3,279 views
              0 likes
              Last Post Leafcutter  
              Started by WHICKED, Today, 12:45 PM
              2 responses
              19 views
              0 likes
              Last Post WHICKED
              by WHICKED
               
              Started by Tim-c, Today, 02:10 PM
              1 response
              9 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by Taddypole, Today, 02:47 PM
              0 responses
              5 views
              0 likes
              Last Post Taddypole  
              Started by chbruno, 04-24-2024, 04:10 PM
              4 responses
              52 views
              0 likes
              Last Post chbruno
              by chbruno
               
              Working...
              X