if(Digits==3 || Digits ==5) TakeProfit*=10; StopLoss*=10; Slippage *=10; CandelSize *=10;Do not modify your externals. Every time you change timeframe or pair you get a deinit/init. Therefor your variable go 10x, 100x, 1000x etc. Global variable are not reset only on load (or recompile)
point=MarketInfo(pairs[MaxIndex],MODE_POINT); dig=MarketInfo(pairs[MaxIndex],MODE_DIGITS);Do not code EA to trade multiple pairs, you can not use ANY predefined variables including your Digits. Code it to trade one pair, then put it on multiple charts. Done.
double pipValue = MarketInfo(pair,MODE_TICKVALUE);
Do not use tickvalue by itself. - 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 = RISK = (OrderOpenPrice - OrderStopLoss)*DIR * OrderLots * DeltaPerlot (Note OOP-OSL includes the SPREAD)
- 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

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
Hi there
I use prerrt coomon logic to calc lot size
it works fine for let's say AUDUSD, from depo $770 about 0.6 lot , or for EURJPG
but for GBPUSD got error "Not Enough Money"
whe I use diff lot's size scripts I get the same lot as per my script for GBPUSD
any ideas why?