hadher ramadhan:
You are probably using imported tick data ?
I am so tired of strategy tester error code 131 iv read too many topics which almost says it is du to wrong trade volume which could be fixed by normalizing the order's lot iv do that but fails tooooo!!
finally i found strange case that there was a ticket with no order matching on chart ,but how to avoid this in real trading??
Alain Verleyen:
You are probably using imported tick data ?
You are probably using imported tick data ?
no sir it downloaded normally from Mt4 tab and it is fresh data
hadher ramadhan:
Then I am afraid nobody can help without more information about how to reproduce this problem.
no sir it downloaded normally from Mt4 tab and it is fresh data
Alain Verleyen:
Then I am afraid nobody can help without more information about how to reproduce this problem.
Then I am afraid nobody can help without more information about how to reproduce this problem.
iv tried re download history data ,,,replace,,time frame, replace pair ,replace broker,and fail i start dout about auto lot code this is what i am using it is so simple
//+------------------------------------------------------------------+ //| Automatical lot's calculating. | //+------------------------------------------------------------------+ double GetLots() { double lot=MathCeil(AccountFreeMargin()*Risk/1000)/100; if(lot<MarketInfo(Symbol(),MODE_MINLOT)) lot=MarketInfo(Symbol(),MODE_MINLOT); if(lot>MarketInfo(Symbol(),MODE_MAXLOT)) lot=MarketInfo(Symbol(),MODE_MAXLOT); return(lot); }
- Lot size must also be adjusted to a multiple of LotStep and check against min and max. If that is not a power of 1/10 then NormalizeDouble is wrong. Do it right.
- Risk is not a function of Free Margin.
Risk depends on your initial stop loss, lot size, and the value of the pair.- In code (MT4):
- 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 (MT4):
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
I am so tired of strategy tester error code 131 iv read too many topics which almost says it is du to wrong trade volume which could be fixed by normalizing the order's lot iv do that but fails tooooo!!
finally i found strange case that there was a ticket with no order matching on chart ,but how to avoid this in real trading??