paulselvan:
Replace NULL with _Symbol
hello
EA strategy tester gives tickValue = 1 , instead of tickvalue in the deposit currecy
So this instruction wont work while in strategy tester ?
Thnaks
When these instructions are used in Indicators
double tickValue1 = MarketInfo(Symbol(), MODE_TICKVALUE); double tickValue2 = MarketInfo(_Symbol, MODE_TICKVALUE); double tickValue3 = MarketInfo(NULL, MODE_TICKVALUE);
they all work perfectly but when in EA strategy tester, they all give value '1' Can we get around this pb
paulselvan:
Even when :
double tickValue = MarketInfo("EURUSD", MODE_TICKVALUE);
tickValue = 1
Does the pb come from AdmiralMarket demo a/c
Is the account currency $?
If so, 1 is correct.
a/c currency is €
Used in indicator, the instruction
double tickValue = MarketInfo("EURUSD", MODE_TICKVALUE)
gives tickValue = 0.82194....
double tickValue = MarketInfo(NULL, MODE_TICKVALUE);
- You can use NULL in place of _Symbol only in those calls that the documentation specially says you can. iHigh does, MarketInfo does not. OrderSend does not.
- Don't use NULL (except for pointers where you explicitly check for it.) Use _Symbol and _Period, that is minimalist as possible and more efficient.
- Zero is the same as PERIOD_CURRENT which means _Period. Don''t hard code numbers.
- MT4: No need for a function call with iHigh(NULL,0,s) just use the predefined arrays, i.e. High[].
- paulselvan: a/c currency is € gives tickValue = 0.82194....That means a move of 1 pip (0.00010) is worth 8.21€/lot or $10.00 USD/lot. 10/1.22xxx=8.2
double tickValue = MarketInfo("EURUSD", MODE_TICKVALUE);
- In code:
Risk depends on your initial stop loss, lot size, and the value of the pair.
- 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
and verify that 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.
MODE_TICKVALUE is not reliable on non-fx instruments with many brokers. - You must normalize lots properly and check against min and max.
- You must also check FreeMargin to avoid stop out
- Use a GUI EA like mine (for MT4): Indicators: 'Money Manager Graphic Tool' indicator by 'takycard' Forum - Page 6
- In code:
Risk depends on your initial stop loss, lot size, and the value of the pair.
thanks for infos whroeder1

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
hello
EA strategy tester gives tickValue = 1 , instead of tickvalue in the deposit currecy
So this instruction wont work while in strategy tester ?
Thnaks