Is something wrong in my profit/risk calculation using OrderProfit()?
No idea, you don't show any code containing OrderProfit()
For a Buy you open at the Ask for a Sell you open at the Bid.
OrderOpenPrice is the price you opened at. Spread has nothing to do with it.
If you want to know the Bid you opened at, you must subtract the spread from buy orders.
It is your stop loss that must be adjusted for the spread for sell orders when you're basing it off the chart (Mt4 charts are Bid charts.)
For a Buy you open at the Ask for a Sell you open at the Bid.
OrderOpenPrice is the price you opened at. Spread has nothing to do with it.
If you want to know the Bid you opened at, you must subtract the spread from buy orders.
It is your stop loss that must be adjusted for the spread for sell orders when you're basing it off the chart (Mt4 charts are Bid charts.)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi there,
I'll go straigth to the point. I have a partial closing function which closes a given percentage of all trades when a certain relationship between profits and initial risk is met.
The thing is, it is closing many more short positions than long positions -Around 15% difference-. I wonder if anyone knows why.
The only thing that comes to my mind is an OrderProfit() issue I am not aware of. Here is the code:
Is something wrong in my profit/risk calculation using OrderProfit()?
Many thanks in advance. Cheers.