Hi
Found this indicator here on FF to draw a dot in the middle of a candle, but when i change timeframe other objects that i have drawn on the chart disappear from the chart.
How can i change the indi so the objects stay on the charts no matter timeframe?
It's only when i have this indicator on the chart i have that probblem.
Thank you in advance!
Found this indicator here on FF to draw a dot in the middle of a candle, but when i change timeframe other objects that i have drawn on the chart disappear from the chart.
How can i change the indi so the objects stay on the charts no matter timeframe?
It's only when i have this indicator on the chart i have that probblem.
Inserted Code
//+------------------------------------------------------------------+ //| London new york open.mq4 | //| Copyright © 2011, tigpips | //| [email protected] | //+------------------------------------------------------------------+ #property copyright "Copyright © 2011, tigpips" #property link "[email protected]" #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 Red #property indicator_width1 0 extern bool UseBarCount = true; extern int BarCount = 5000; double dotBuffer[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- drawing settings SetIndexArrow(0, 108); //---- SetIndexStyle(0, DRAW_ARROW, STYLE_DOT); SetIndexBuffer(0, dotBuffer); SetIndexLabel(0,"Mean Candle Dot"); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int iBarsToCalc; if(UseBarCount == true) { iBarsToCalc = BarCount; } else { iBarsToCalc = Bars - IndicatorCounted(); } if (iBarsToCalc < Bars) iBarsToCalc++; for (int i=iBarsToCalc-1;i>=0;i--) { dotBuffer[i] = (High[i]+Low[i])/2; } return(0); } //+------------------------------------------------------------------+
Thank you in advance!
Blindly following others will make you blind!