double pointValue = MarketInfo(Symbol(), MODE_TICKVALUE);
- You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
- Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
- Do NOT use TickValue by itself - DeltaPerLot
- You must normalize lots properly and check against min and max.
- You must also check FreeMargin to avoid stop out
However this doesn't help, as it seems that only DAX30 (perhaps also something else, but i didn't notice so far) works differently.
You need to check whether MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a value in the instrument's base currency (EUR, in this case).
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers.
Thanks on comment whroeder,
unfortunately this doesn't help - i am of course using MODE_TICKSIZE to get what you call DeltaPerLot, as well as lot size vs MODE_MIN/MAXLOT, risk percent etc. later in calculation.
MODE_TICKVALUE should return point value per lot in deposit currency and so it does for any instrument i tried (most of pairs, metals, CFDs and futures) except for DAX30, so my calculation works in all other cases.
It was pointed out to me that Alpari defines MODE_LOTSIZE as Lot size, Contracts = 10 for DAX30, meaning that you are buying 10 contracts and you should multiply the price by 10.
This means that MODE_LOTSIZE has different meanings for different instruments in contract specifications, e.g. Lot size, Troy oz = 100 for XAUUSD, Lot size, Base Currency = 1 for BTCUSD etc. so i tried to differentiate how to use MODE_LOTSIZE by using MODE_PROFITCALCMODE which returns
0 - Forex; 1 - CFD; 2 - Futures |
But unfortunately i can't because it returns always 1 (CFD) for anything that is not a currency pair.
You need to check whether MODE_TICKVALUE is returning a value in your deposit currency, as promised by the documentation, or whether it is returning a value in the instrument's base currency (EUR, in this case).
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers.
Thanks on comment,
EUR is my deposit currency :)
I would notice this as i am trying out on demo (USD base) and live (EUR base).
FYI: my other broker has MODE_LOTSIZE = 1 for DAX30, and calculations work fine with him
Can you post screenshots with symbols' specifications, for example for DAX30 and CAC40 (if you think CAC40 has correct values).
Hi Stanislav,
that was the way to troubleshoot. After checking it out, it seems that all stock index CFDs are returning invalid MODE_TICKVALUE, 10x smaller than it should be.
In tables, the Pip value per 0.1 lots, is correctly specified, however this is 10 x bigger value than the one MODE_TICKVALUE returns.
I will check once more with Alpari support.

- alpari.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
To get the point value per lot in deposit currency for any instrument i am using:
However, for DAX30 on Alpari value is 10 times smaller then the one you get when you open a position.
As Alpari support claims everything is OK, i tried to use additional parameters to filter out this as a special case:
All currency pairs use profitCalcMode = 0, and other instruments (e.g. WTI, XAUUSD, DAX30) are using profitCalcMode = 1.
However this doesn't help, as it seems that only DAX30 (perhaps also something else, but i didn't notice so far) works differently.
Anybody knows how to solve this?