Forum

Error 4204

Error 4204 I am looking to create an indicator that will create labels to display current pricing details on a chart. However, error 4204 (ERR_OBJECT_GETDATE_FAILED) occurs when adding this indicator to the chart. Can someone help debug this? --- int OnCalculate(... { string label[5][2];

ChartRedraw vs WindowRedraw

What is the difference, if any, between ChartRedraw() and WindowRedraw(). Or do they perform the same operation? Is there a best practice for when to call one function versus the other? Thank you

Close[]

While a candle (or bar) is still open (e.g. minute 00:57 on the H1 timeframe), what is the close price of the current candle? In other words, what value is returned for Close[0] when the current candle has not closed yet? Thank you

Ticks

How can I get the current price (last tick) of a given symbol? I have tried calling the MqlTick and SymbolInfoTick, but this has failed to return the last tick. Code: MqlTick lastTick; SymbolInfoTick(Symbol(),lastTick); double price = lastTick.last; Output: price = 0.000000000 Thank you for any