minimum stop loss and minimum take profit

 

hi ;)


i need your help!

could please somebody explain me how to calculate the minimum stop loss and minimum take profit for a broker to place an order?


i found this here, but im not sure if this is right, specially if i want to place more than one order.

  1. Declare a global variable for the minimum StopLevel; e.g.:
    int StopLevel;
  2. In the init() function of your expert advisor define the minimum StopLevel:
    StopLevel = MarketInfo(Symbol(), MODE_STOPLEVEL) + MarketInfo(Symbol(), MODE_SPREAD);
    Note, that adding a spread difference is also required.
  3. The next time your stop-loss or take-profit is calculated, just check them to be not less than StopLevel:
    if (StopLoss < StopLevel) StopLoss = StopLevel;
    if (TakeProfit < StopLevel) TakeProfit = StopLevel;
  4. Don’t forget to refresh the current market rates with RefreshRates() before adding the stop-loss/take-profits levels to the actual market rates.

thank you!

mike