Why? The EA can't see them, it has no eyes.
the EA calculates the trades depending on multi-symbol and multi-timeframe signals from a set of 5 indicators. And i want to see all the calculated values at the mainwindow, so i need all the availabe space.
i know, I can delete all indicators and subwindows on my own before running the ea, but since the EA is doing very well and the major part of coding is done, I'm looking for some extra-work on it.
Then don't attach the indicators to the chart. The EA doesn't need them attached. Just get the values.
Hi WHRoeder
i really don't want to criticize you.. you are one of a few whose postings are very useful for me and i've used many code-snippets from you..
but in this case the question is: is it possible to send a faketick from OnInit() before OnInit() is completely done??
and not: what should i do with open indicators ??
.. i've tried the following:
#property strict #include <_V1_Header.mqh> #define SYSTEM_MODULE "TradeManager" //--------------------------------------------------------------------------------------------------------------------- int OnInit ( void) { //--- OnInit body start EventSetMillisecondTimer(1000); return(INIT_SUCCEEDED); } //--- OnInit body end //--------------------------------------------------------------------------------------------------------------------- void OnDeinit (const int ci_reason) { //--- OnDeinit body start return; } //--- OnDeinit body end //--------------------------------------------------------------------------------------------------------------------- void OnTick ( void) { //--- OnTick body start Print("FakeTick"); return; } //--- OnTick body end //--------------------------------------------------------------------------------------------------------------------- void OnTimer ( void) { //--- OnTimer body start SendFakeTick(0, true); return; } //--- OnTimer body end //--------------------------------------------------------------------------------------------------------------------- void OnChartEvent (const int ci_id, const long& crl_parameter, const double& crd_parameter, const string& crs_parameter) { //--- OnChartEvent body start return; } //--- OnChartEvent body end //---------------------------------------------------------------------------------------------------------------------
Timer runns every one second and should "produce" one tick
but the print("Faketick"); isn't done..
Therefore i think the problem is not the location of SendFakeTick() at OnInit(), but SendFakeTick() or PostMessageA(ci_hWnd, ci_Msg, 2, 1) doesn't produce really a faketick ??
Hi,
big thanks to gooly @ https://forum.mql4.com/69682 "You have to import and use "ShellExecuteW" since b600+!"
PostMessageA() and RegisterWindowMessageA() replaced by PostMessageW() and RegisterWindowsMessageW()
and now SendFakeTick() produces one single faketick inside of OnInit()... WindowSubWindowsDelete() does what it should
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
is it possible to send a faketick from OnInit() before OnInit() is completely done??
My problem is, i want my EA to delete all running indicators from the chart before starting. At the OnInit()-section the EA runns this function:
This code is doing well, but (MQL4 Reference): Removes an indicator with a specified name from the specified chart window. The command is added to chart message queue and executed only after all previous commands have been processed.
So i have to send one faketick. Therefor i have the SendFakeTick()-function:
I'm not sure if this really sends a faketick, because even if i set the timer and run SendFakeTick() at OnTimer(), all open subwindows and indicators stay on the chart.
... and also I wonder, because if i send one tick with mt4ticker, all subwindows and indicators are deleted.