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'd also like to think of something so that when working on the account, the EA has an immediate reaction to the global variables created by the indicator, rather than waiting for a tick.
For some reason, the EA is only supposed to start with a tick. It would be nice if it could also run on an event. There is an option of only a looped script instead of an EA, but again, it is a heavy load on the computer. Can a single execution of the script be encoded in some way by an event? The script can be launched using hotkeys. How about simulating the pressing of these hot keys using events? The script code should be made absolutely identical to that of the Expert Advisor. Then it will do the same thing as the Expert Advisor in the gap between ticks.
First we need to check where the chart event occurs first in the indicator or in the EA, if in the indicator (most likely it does), then when working in the tester we catch the globals in onTick(), and when working in the account in onChartEvent().
The timer is not interesting, it implies not instant reaction.
When setting each order, you create two stop and profit objects, then every tick you read them and check if they have changed compared to the real ones, if they have, you modify the order... and then drag them on the chart as you want
When setting each order, you create two stop and profit objects, then every tick you read them and check if they have changed compared to the real ones, if they have, you modify the order... and then drag them on the chart as you want
...create arrows/dashes instead of lines)
events in the tester do not work
ps. if there is only one open order in the EA at the same time, then the stop and profit objects should be reset to the new order
First we need to check where the chart event occurs first in the indicator or in the EA, if in the indicator (most likely it does), then when working in the tester we catch the globals in onTick(), and when working in the account in onChartEvent().
The timer is not interesting, it implies not instant reaction.
...create arrows/dashes rather than lines)
events in the tester do not work
ps. If there is only one open order in the EA at the same time, then the stop and profit objects are the same as for the new order
Events do work in the indicator installed on the visual chart of the tester. I have this idea: each press of the +SL or -SL button moves SL by one point or by 5 points, as it needs. This, of course, is not a drag, but not bad either. Maybe even better. I probably will stop at this one. (Simple and tasteful.) It's easy to implement with one order. But, if we have more than one, we will need to implement another order triggering device. But, I usually test strategies with one order.
In the indicator installed on the visual test chart the events are working. I came up with the following idea: each press of +SL or -SL button moves SL by one point, or by 5 points to whichever is necessary. This, of course, is not a drag, but not bad either. Maybe even better. I probably will stop at this one. (Simple and tasteful.) It's easy to implement with one order. But, if we have more than one, we will need to implement another order triggering device. But, I usually test strategies with one order.
Have you tried the file I attached on the first page? Try dragging the line - it's very convenient and fast, try it yourself as well