Forum

Indicator that draws bars in separate window

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

Run OrderSend only in active Symbol window? Why?

Hi, 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 orders for pair trading and don't know why I can't do that

Q: Functions that returns more params and window without the symbol?

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 the symbol? The chart would be drawn by indicator. Thank

Indicator in 2 windows?

Hi, 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

Time coordinate error (in Pitchfork object)

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, OBJPROP_TIME2); p2 = ObjectGet(name, OBJPROP_PRICE2); t3 = ObjectGet(name, OBJPROP_TIME3); p3 =

Visible bars counter?

Hi, 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? cornelius