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, 05-11-2026, 05:56 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      35 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      198 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      364 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      283 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X