# Why StopLoss and TakeProfit oftenly have big integer values?

611

Hello folks I have the following sample code taken from internet...

```input int StopLoss = 1000;
input int TakeProfit = 1000;
...
double positionOpenPrice = PositionGetDouble(POSITION_PRICE_OPEN);
if (StopLoss > 0)
request.sl = positionOpenPrice - (StopLoss * _Point);
if (TakeProfit > 0)
request.tp = positionOpenPrice + (TakeProfit * _Point);
if (request.sl > 0 || request.tp > 0)
OrderSend(request, result);
```

I would like to know why the StopLoss value is oftently given like that?

I think should be better, say something like (for a buy order): if the stop loss will be 100 pips, then:

`request.sl = positionOpenPrice - 0.0100;`

Is there some convention to deal with that nomenclature?

```input int StopLoss = 1000;
input int TakeProfit = 1000;
```

Moderator
1950

Because the price your broker provieded maybe 5 or 4 digits. So the point maybe 0.00001 or 0.0001.

41787

And  You can use the following commands:

```int OnInit()
{
int mydigit=1;
if (_Digits== 3 || _Digits == 5 )
mydigit=10;

}

...
int stoploss=StopLoss*mydigit;
int takeprofit=TakeProfit*mydigit;  ```
Moderator
18003

cyberglassed:

Hello folks I have the following sample code taken from internet...

I would like to know why the StopLoss value is oftently given like that?

I think should be better, say something like (for a buy order): if the stop loss will be 100 pips, then:

Is there some convention to deal with that nomenclature?

```input int StopLoss = 1000;   // How many points for the SL ?