- Basket Trading System (T101 system)
- Trading a portfolio of currency pairs
- [Branch closed!] EURUSD - Trends, Forecasts and Consequences (Episode 4)
Forum on trading, automated trading systems and testing trading strategies
Welcome,
- Usually people who can't code don't receive free help on this forum, though it could happen if you are lucky, be patient.
- If you show your attempts and describe well your problem, you will most probably receive an answer from the community.
- If you don't want to learn to code, nothing bad, you can either look at the Codebase if something free already exists, or in the Market for paid products (sometimes free also).
- Finally, you also have the option to hire a programmer in the Freelance section.
Good luck.
-
In the presence of multiple orders (one EA multiple charts, multiple EA's,
manual trading)
- You must count down when closing/deleting/modifying in a position loop. Get in the habit of always counting down. Loops and Closing or Deleting Orders - MQL4 forum
- and check OrderSelect. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
- You must RefreshRates after sleep and between multiple server calls if you want to use the Predefined Variables (Bid/Ask) or OrderClosePrice() instead.
-
There is Tick, PIP, and Point. They are all different in
general. A tick is the smallest change of price. A Point is the least
significant digit quoted. In currencies a pip is defined as 0.0001 (or for JPY 0.01)
On a 4 digit broker a point (0.0001) = pip (0.0001). [JPY 0.01 == 0.01] On a 5 digit broker a point (0.00001) = 1/10 pip (0.00010/10). Just because you quote an extra digit doesn't change the value of a pip. (0.0001 == 0.00010) EA's must adjust pips to points (for mq4.) In currencies a tick is a point. Price can change by least significant digit (1.23456 -> 1.23457)
In metals a Tick is still the smallest change but is larger than a point. If price can change from 123.25 to 123.50, you have a TickSize of 0.25 and a point of 0.01. Pip has no meaning.
This is why you don't use TickValue by itself. Only as a ratio with TickSize. See DeltaValuePerLot()
- You are not adjusting SL, TP, and slippage for 4/5 digit brokers.double pip = StringFind(_Symbol,"JPY") < 0 ? 0.01 : 0.0001;
int pip_digits = (int)MathLog10(pip/_Point);
int slippage = 3 * int(pip / _Point); - Your code includes the spread in SL and TP. Fails if the spread is larger than 2 pips (StopLoss=2, closes immediately.) Does not use server stops, fails when connection is lost.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use