I wrote simple indicator for pais trading showing in separate window ratio e.g silver/gold, basing on close prices.
Do you have an idea how to draw same ratio but represented by bars instead of a line?
I have been trying to run the below script to open an order for e.g. EURUSD.
When the active window in Terminal is EURUSD then the order is open but if I click on a window of any other symbol, the error 129 appears.
I need to open two...
I have 2 questions about MT4 and MQL4:
1. Can the function return more params than one? I know it is possible to do it by merging params into one string but maybe is better solution?
2. Is it possible to open in MT4 a window without choosing...
I want to write an indicator that draws 2 symbols (e.g. Gold and Silver) in the main window and their difference in the subwindow.
How to do that when I must declare the property indicator_chart_window or indicator_separate_window?
I have used Pitchfork coordinates to calculate the middle point (4) of the 2-3 leg. Th code is simple:
t1 = ObjectGet(name, OBJPROP_TIME1);
p1 = ObjectGet(name, OBJPROP_PRICE1);
t2 = ObjectGet(name,...
To have bar counter is very simple. Something like:
Comment("Bar count on the current symbol is ",iBars(NULL,0));
But it shows at some timeframes over 2000 bars.
How to count the bars visible on the chart...