Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 168

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
Please tell me what I'm doing wrong. I am trying to make a simple indicator:
It works in the chart window, but when I try to test it in the Expert Advisor, it either draws whatever it is or "no steps".
Tried it. Even just in the window doesn't work this way. Apparently there's some kind of trick here. It works this way now, but is terribly slow:
This is with the last bar recalculation check disabled.
Hello, MQL4 programming gurus! Please advise how this is possible:
A piece of program code:
A piece of log for this section:
The question is how for the same order the conditions could have worked:I don't understand something, but then logically it turns out that for this order:
Basically I don't care why this happens, what matters is that sellCntr++ and buyCntr++ are executed unambiguously for a certain type of open order, help me fix it?Hello, MQL4 programming gurus! Please advise how this is possible:
A piece of program code:
A piece of log for this section:
The question is how for the same order the conditions could have worked:I don't understand something, but then logically it turns out that for this order:
Basically I don't care why this happens, what matters is that sellCntr++ and buyCntr++ are executed unambiguously for a certain type of open order, help me fix?TrailingByShadows(OrderTicket(), Period(), 11, 0); ?????????????????????????????? Вы при трале разве ордера не перебираете ??????????
How can you be sure that it is the same order? You don't print the ticket ;).... I'm sure: when you trawl, the order is oversampled ;) - The induced error is from there.
Logically, why would I go through the orders in the trawl if I already know which specific order I need to trawl? There is no brute force, here is the code:
PS: By the way, this problem occurs only in real conditions, i.e. it is not reproduced in the tester.Such a problem has arisen. The strategy tester only works once. More precisely, the visualisation test is triggered once, and the next times you press the "start" button, the "visualisation" checkbox is reset and nothing happens (sort of doesn't happen). How can this be defeated?
Logically, why would I go through the orders in the trawl if I already know which specific order I need to trawl? There's no brute force, here's the code:
PS: By the way, this problem occurs only in real conditions, i.e. it is not reproduced in the tester.Try to run it in this variant:
See what the log will say.
WindowBarsPerChart() - WindowFirstVisibleBar() - 2;
you can, but how to expose it.
Added
It seems that you can do it programmatically through templates. Create a template with an indicator, with _lread kernel32.dll read shift_size value, with _lwrite write there a number from 10 to 50, like such ranges can accept this parameter, then through InternalMsg load a template. But we don't know if it is 33511 or 35511. In WinUser32.mqh, it is the first option, while in the forum it is the second. The question must be addressed to Junko. It is much easier in MT5. CHART_SHIFT_SIZE is available there through ChartSetString() and ChartGetString() from any point in the code... Maybe there are other options in MT4? Silly question, though...
Such a problem has arisen. The strategy tester only works once. More precisely, the visualisation test is triggered once, and the next times you press the "start" button, the "visualisation" checkbox is reset and nothing happens (sort of doesn't happen). How can this be defeated?