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 NullPointStrategies, 03-13-2026, 05:17 AM
      0 responses
      87 views
      0 likes
      Last Post NullPointStrategies  
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      151 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      79 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      53 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      62 views
      0 likes
      Last Post TheRealMorford  
      Working...
      X