Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stoploss setup problem

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

    stoploss setup problem

    Speed = 100;
    SL = 25;
    TP = 125;
    }
    else if (State == State.Configure)
    {
    }
    else if (State == State.DataLoaded)
    {
    SMA1 = SMA(Close, Convert.ToInt32(Speed));
    SetStopLoss("", CalculationMode.Ticks, SL, false);
    SetProfitTarget("", CalculationMode.Ticks, TP);
    }
    }


    When strategy opens a position, stoploss is trying to be set not at 25 ticks away from entry, but at fixed price and its often not in market, so the strategy always get errors with that
    Attached Files
    Last edited by timur; 10-18-2019, 07:56 AM.

    #2
    Hello timur,

    Thank you for your reply.

    I've made a quick example strategy that enters long if the price goes above a 100 period SMA. The strategy will place the profit target at 125 ticks and the stop loss at 25 ticks. I'm not seeing any rejected stop loss orders with this. Please test on your Sim101 Account - do you get the same behavior from the attached example?

    Do you try to set a Stop anywhere else in your code, either to adjust an existing stop or place a different one? Would you be able to provide an example of your code where your strategy enters a position?

    Thanks in advance; I look forward to assisting you further.
    Attached Files

    Comment


      #3
      Hello timur,

      Thank you for your patience.

      Just following up to see if you'd had a chance to review my questions in my previous post.

      Thanks in advance; I look forward to assisting you further.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by CarlTrading, 03-31-2026, 09:41 PM
      1 response
      79 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      40 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      54 views
      0 likes
      Last Post CarlTrading  
      Working...
      X