Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stopLoss setting (true / false) ???

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

    stopLoss setting (true / false) ???

    Hello,
    I can not understand how the setting of stopLoss using the method (true / false). The code I created a region for order management, where should I move the stop to breakeven when price rises to Be1 (BreakEaven), then again I have to move to the Be1 + value, when the price rises to Be2.
    For example:
    code
    #region OrderRouting
    private void ManagerOrder ()

    if (Position.MarketPosition == MarketPosition.Long )
    SetStopLoss(CalculationMode.Percent,0.02);//Initial Stop

    if( Be1 && High[0] > (Position.AvgPrice + 2 ))
    SetStopLoss("LongFibo°", CalculationMode.Price,Position.AvgPrice,true);//Stop moved to breakeven

    if( Be2 && High [0] > (Position.AvgPrice+5))
    SetStopLoss("LongFibonacci°", CalculationMode.Price,Position.AvgPrice+ 2);// Stop moved to AvgPrice+2

    The stop in this way are activated when the condition occurs, then the next candle, if the condition is no more, the stop is not active. How do I?
    Thanks.
    Roberto
    Please respond by speaking simply because my English is not very good

    #2
    Roberto, this bool determines if the stop is simulated or not - if you use it simulated, that means it's only send when triggered in realtime, an effective way to 'hide' it from the market. In backtesting it would not make a difference which one you use.

    Comment


      #3
      Sorry Bertrand,
      I did not understand your answer. Can you give me an example, please.
      Thanks.
      Hello
      Roberto

      Comment


        #4
        Roberto, if the stop is not set to simulated > it would rest in the market / at your broker.

        If it's set to simulated, it would not rest in the market but local on your PC and be sent once triggered by price.

        Comment


          #5
          so if I do:
          SetStopLoss("LongFibo°", CalculationMode.Price,Position.AvgPrice,true)//rest in my PC.

          SetStopLoss("LongFibo°", CalculationMode.Price,Position.AvgPrice,false)// rest in the market at my Broker.
          it's correct?
          Ciao
          Roberto

          Comment


            #6
            Hello,

            Correct.

            Let me know if I can be of further assistance.
            BrettNinjaTrader Product Management

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by sjsj2732, Yesterday, 04:31 AM
            0 responses
            33 views
            0 likes
            Last Post sjsj2732  
            Started by NullPointStrategies, 03-13-2026, 05:17 AM
            0 responses
            286 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            284 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            133 views
            1 like
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            91 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Working...
            X