[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 68
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Good afternoon.
Question how to test or whose results are more reliable ?
In the Expert Advisor the H1 period is clearly prescribed everywhere.
I am testing on m1 on open - clear loss.
I have tested it on H1 with all ticks going up.
The problem is that the stops are small - just a few points. Profits are large.
If the EA has explicit control over the opening of a new bar and it only works when a new bar opens, then you can test on the opening of a new bar. Otherwise, only ticks. Moreover, the stops are small and they will obviously be blown away at the opening of a new bar, because on M1 a bar can catch your stop in a few pips in a minute. Test all ticks on M1.
how will (in theory) all ticks differ from H1 ?
Hello! Please help me to understand the code, what I'm doing wrong. I'm new to programming. I've read my mql4 tutorial and looked through a lot of Expert Advisor codes, but i still can't find the answers to my questions. I have a terminal with 5 digits, ECN account, variable spread + commission. The Expert Advisor is the easiest, it opens sell order when the fast МА crosses the slow МА from top to bottom and vice versa when the fast МА crosses the slow МА from bottom to top. In fact the TS is much more complex, I just don't have all basic functions working properly yet and cannot properly test it, let alone optimize it, I decided not to complicate the code with redundant calculations. Here is the code of the Expert Advisor itself.
Maybe somebody can answer my questions:
1. When I open an order, I keep nulls in OrderSend where parameters Stopplos and TakeProfit should be; at an attempt to put other numbers there, the expert doesn't open deals; I checked if I can manually open a deal and immediately set SL and TP, what may be the problem?
2. I do not understand why I set TP, SL and TS of 100 pips, although trades are closed not multiple of these pips, even taking into account the spread. Maybe my order closing function does not work? How can I limit loss in this case, originally set SL, and how do I get it to follow price only in + direction?
3. My brokerage company has Stop Level=100 pips, how can I set virtual TP and SL, so that I could set levels lower than the Stop Level, like at manual closing of positions? (Pips in Ecn accounts is not prohibited).
4. Is it possible to do the following, and if it is possible: to make a reverse close and simultaneously close by the SL and TP with a transfer to Breakeven (depending on which event happens first)? I tried to do it, but in the tester it opens one position and does not close it until the end of the test, but only collects swaps). Either one of them works.
Thanks in advance to all who will answer!
Good afternoon ...
Just one question
Let's take a fractal on Daily... How to find the price which ends the formation of this fractal, say on H1 .... It is desirable that on the price appears arrow...
Gentlemen, how does an EA connect to a specific server and port? Is it even possible?
Gentlemen, how does an EA connect to a specific server and port? Is it even possible?
What does it mean to connect to a socket? Or to read information via http?
Just one question
Let's take a fractal on Daily... How to find the price which ends the formation of this fractal, say on H1 .... It is desirable that on the price appears arrow...
Good afternoon!
Question about special functions: init(), start(), deinit().
As you know, including from the tutorial, in order to terminate (exit) this special function, you MUST COMPLETELY add the
Return operator (for example, in conditional operator IF-ELSE).
What do the return values mean then? For example: Return(0) and possibly some other integer (Return(1));
Good afternoon all!
Please help me to edit a little the indicator "FX5_Divergence_V2.1".
I am working with 3 screens. The indicator in the window is displayed with its name and some other values and they make it hard to see the indicator. Often because of these figures I cannot see indicator nodes and it is difficult to compare them (circled in yellow on the screenshot).
(Please help me to correct the indicator so that only the indicator name is displayed, without all other digits)
Indicator and screenshot in appendix.
Thanks in advance to anyone who can help)