Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Changing SL when strategy enabled

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

    Changing SL when strategy enabled

    Hello,

    I am running multi-instrument strategy on M15 bars. Currently I have coded basic conditions and submitting Stop Orders (EnterLongStop, EnterShortStop) ans SL Orders (SetStopLoss). I do not have any conditions regarding managing open position (trailing stop, profit target, etc.)

    For now I would like to manage the position manually but without disabling the strategy.

    When I change SL manually it works till the end of the M15 bar. After bar update SL returns to it previous value.

    Is this expected? If yes, can it be changed the way I prefer to do it as explained above.

    #2
    Depending on where you have using SetStopLoss, you will find the value to be reset to it's original set price on the new bar update.

    It is not recommend to manually move stop and targets orders using these methods. If you'd like to have a mix where you can manually change stops and targets, you may consider calling an ATM Strategy from your NinjaScript strategy which would give you more control.

    Information the ATM Strategy Methods can be found below:



    You can see a working example by going to Tools--> Edit NinjaScript--> Strategy--> SampleATMStrategy
    MatthewNinjaTrader Product Management

    Comment


      #3
      Hello,

      I have checked ATM Strategy Methods and an example.

      If I understand right I can specify in the code entry order value only and stop loss order value can be specified in ATM strategy only.
      The issue is that in ATM Strategy I can define SL order in pips only. In my strategy SL order is a variable and is based on the price, not pips.

      Can I send stop loss value from the code to ATM strategy?

      Comment


        #4
        You would not be able to specify the number of ticks/pips that the ATM Strategy stop loss is set at directly, but you can create multiple ATM Strategy templates and call those in various areas of the script.

        If your stop loss variables are calculated based off market dynamics you cannot define, you will have to stick with the the managed order methods, however these orders may be reset if you change them manually.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CortexZenUSA, Today, 12:53 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by CortexZenUSA, Today, 12:46 AM
        0 responses
        1 view
        0 likes
        Last Post CortexZenUSA  
        Started by usazencortex, Today, 12:43 AM
        0 responses
        5 views
        0 likes
        Last Post usazencortex  
        Started by sidlercom80, 10-28-2023, 08:49 AM
        168 responses
        2,265 views
        0 likes
        Last Post sidlercom80  
        Started by Barry Milan, Yesterday, 10:35 PM
        3 responses
        11 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Working...
        X