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

Strategy defining stops

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

    Strategy defining stops

    I have a EnterLongStopLimit . I was wondering if I have to change the price point on the EnterLongStopLimit how do I change the price.

    EnterLongStopLimit( nNumberOfContracts,MyCloudLine[0], Low[0] - dStopLossFromChartinTicks*TickSize, "Long");

    If I leave this statement the order will work. A few bars later it will cancel the order. The bar after it will re submit.

    If the price point ,MyCloudLine[0] changes in price do I cancel my order and resubmit or do I just use the same statement.

    EnterLongStopLimit( nNumberOfContracts,MyCloudLine[0], Low[0] - dStopLossFromChartinTicks*TickSize, "Long");



    #2
    Now I have another question

    This Scenario works
    EnterLongStopLimit(nNumberOfContracts,MyCloudLine[0],MyCloudLine[0] - nBaseLineTickOffset*TickSize,"BaseLineLong");
    vs
    This gives an error.
    EnterLongStopLimit(nNumberOfContracts,MyCloudLine[0],Low[0] - nBaseLineTickOffset*TickSize,"BaseLineLong");

    Is it better to wait the order to be filled and then add a stop?

    When the order is filled I want the stop to be the candle low - 3 Ticks;

    Comment


      #3
      Hi ballboy11, thanks for your question.

      If you call the same order method with the same signal name the order will be "Changed" to the new price rather than "Canceled, then replaced".

      It appears you are talking about a stop-loss order but the method posted is submitting a Buy Stop Limit order which would be different than a Stop Loss that exits a position for you. A Buy Stop Limit order must have a stop and limit price above the market.

      We have an example here that shows how to apply protective orders to open positions:


      Please let me know if I can assist any further.
      Chris L.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by bmartz, 03-12-2024, 06:12 AM
      4 responses
      31 views
      0 likes
      Last Post bmartz
      by bmartz
       
      Started by Aviram Y, Today, 05:29 AM
      4 responses
      12 views
      0 likes
      Last Post Aviram Y  
      Started by algospoke, 04-17-2024, 06:40 PM
      3 responses
      28 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by gentlebenthebear, Today, 01:30 AM
      1 response
      8 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by cls71, Today, 04:45 AM
      1 response
      7 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Working...
      X