Why does this ea not open a subwindow?
subwindow_number=ChartWindowFind(0,subwindow_shortname);
The "subwindow_number" gets -1, but I don't know the reason.
If you change "void OnTick()" to "int OnCalculate()", it will work properly (i.e. not EA, but indicator).
Any help would be appreciated!
-
EAs can't create (sub) windows. They run on the main chart.
-
IndicatorSetString(INDICATOR_SHORTNAME,subwindow_shortname);
Invalid for an EA. -
subwindow_number=ChartWindowFind(0,subwindow_shortname);
There is no sub-window to find.
-
EAs can't create (sub) windows. They run on the main chart.
- Invalid for an EA.
- There is no sub-window to find.
I have deleted your new topic as it is obviously related to this topic.
Don't open multiple topics with the same subject.
Your new topic post copied below
So i know only ea's can open/close positions, and only custom indicators can use a subwindow.
Is there a way to mix these two? (To make an ea that opens a trade when you press a button)
Thanks
(see attached file)
i can't figure out why this ea doesn't show the buttons in a new window. When i start it on a window literally nothing happens.
Any help would be appreciated!