Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

More than one TP and STP for the same order

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

    More than one TP and STP for the same order


    Hello ,

    when I create an order with 10 contracts, I get a TP divided in two with two prices
    how do I get all the contracts in a single TP that contains all the contracts? Thanks​
    below is my code :

    EnterLong(10,"Achat");
    SetStopLoss(CalculationMode.Ticks, 30);
    SetProfitTarget(CalculationMode.Ticks, 40);​​

    Click image for larger version

Name:	image.png
Views:	184
Size:	27.9 KB
ID:	1285104

    #2
    Hi scalping_Strategy​,

    What is happening is that you're getting partial fills at different prices. I'd recommend setting your targets/stops based on prices and not ticks.

    Hope that helps,
    Matt

    Comment


      #3
      Hello scalping_Strategy,

      Thanks for your post.

      Matt is correct and has provided some great information on this topic.

      Another thing to keep in mind is the Set methods should be called before the Enter method in your script.

      For example:

      SetStopLoss();
      SetProfitTarget();
      EnterLong();

      From the SetStopLoss()/SetProfitTarget() help guide pages: "Since they are submitted upon receiving an execution, the Set method should be called prior to submitting the associated entry order to ensure an initial level is set."

      SetStopLoss(): https://ninjatrader.com/support/help...etstoploss.htm
      SetProfitTarget(): https://ninjatrader.com/support/help...ofittarget.htm
      <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by NullPointStrategies, Today, 05:17 AM
      0 responses
      48 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      126 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      66 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