Use OrderLots()
Something like that. No need to recalculate lots when you are closing orders.
Use OrderLots()
Something like that. No need to recalculate lots when you are closing orders.
I used OrderLots()
but says error message as given above.
Print the value of LotPer after you have calculated it.
I don't know what 'Lots' is, but I'm guessing LotPer won't be what you expect.
Lots = Volume
Print the value of LotPer after you have calculated it.
I don't know what 'Lots' is, but I'm guessing LotPer won't be what you expect.
I agree
as MathRound returns an integer it can never be 0.5 as Sherrif expects
I agree
as MathRound returns an integer it can never be 0.5 as Sherrif expects
I removed Mathround() function. still error.
can any one help me to get exact way!
double LotPer = OrderLots()*Lots/100;
As I suggested above, print the value of LotPer.
And show us where you declare/set the value of 'Lots'
double LotPer = OrderLots()*Lots/100;
- 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,
I want to close when order runs with +20 pips i would like to close running order % of order partially with some profit.
eg:
lot size: 1 lot
partial close parameter is = 50%
so when order is running above 20+ profit pips i would like to close the order partially 50% of lot size. according to settings it should close 50% of lot size 0.50 order partially, remains running with 0.50 lot.
i have tried coding. but it shows error message.
error message:
Code i tried:
what wrong with this above code?