In SendOrder, how to make stop loss in points?
The stop loss parameter is a price, so calculate that price. It is simple arithmetic.
In a simplified pseudo code ...
[stop-loss price] = [Ask/Bid at opening] ± [stop-loss in points] * _Point Please note that ...
- a Buy order opens at Ask but closes at Bid
- a Sell order opens at Bid but closes at Ask
The stop loss parameter is a price, so calculate that price. It is simple arithmetic.
In a simplified pseudo code ...
Please note that ...
- a Buy order opens at Ask but closes at Bid
- a Sell order opens at Bid but closes at Ask
I know it is simple arithmetic but I do not know how to turn price to points and then back to price, if you meant I should do
Ask - 5 * _Point
as my stop loss, that does not work.
Bid - 5 * _Point
A buy order closes at the Bid price, not the Ask price.
Also, 5 points is very little if you have a Stops Level limitation set by the broker. So you will need to check.
Hello,
I have this now:
so right now I have no stop loss, however I want the stop loss to be in points, for example half a pip or 5 points.
I know the stop loss must be put in as price, but I do not know how to calculate it?
Thanks!