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 Mindset, 04-21-2026, 06:46 AM
      0 responses
      88 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      134 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      67 views
      0 likes
      Last Post PaulMohn  
      Working...
      X