Hi,
I trying the get the value of negatif profit using POSITION_PROFIT but the result show the positif value.
But the result
2013.03.12 13:37:12 rt (EURUSD,M30) Profit Now 10
Anybody can tell me what wrong? or my coding wrong?
tq
Shouldn't it be this ?
Print("Profit Now ", PositionGetDouble(POSITION_PROFIT) );
Shouldn't it be this ?
I believe RaptorUK is correct. Strange thought that POSITION_PROFIT initializes as 10 :)
Br, Candles
EDIT: OK, all of the ENUM_POSITION_PROPERTY_DOUBLE have initial integer values. Probably has some deeper meaning which I cannot understand :)
My apologies for the OT.
I believe RaptorUK is correct. Strange thought that POSITION_PROFIT initializes as 10 :)
Br, Candles
EDIT: OK, all of the ENUM_POSITION_PROPERTY_DOUBLE have initial integer values. Probably has some deeper meaning which I cannot understand :)
My apologies for the OT.
POSITION_PROFIT is from an ENUM and is an integer constant.
PositionGetDouble(POSITION_PROFIT) is a function that return a double and take an ENUM (integer with limited dataset) as parameter.
Nothing with "some deeper meaning" here.
Shouldn't it be this ?
Thank RaptorUK for your advise. It work now.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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 trying the get the value of negatif profit using POSITION_PROFIT but the result show the positif value.
But the result
2013.03.12 13:37:12 rt (EURUSD,M30) Profit Now 10
Anybody can tell me what wrong? or my coding wrong?
tq