You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
thank you very much!
next time:
explain a bit more about your goals.
next time:
it does not redraw. i want to redraw lines when the circle ends.
look at the code. where i have a mistake?
//+------------------------------------------------------------------+
#property strict
#property indicator_chart_window
extern int Quartile = 10;
extern int TimeH = 10;
string obj_name="R.T. Lines : ";
long current_chart_id=ChartID();
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--- indicator buffers mapping
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//---
ObjectDelete(current_chart_id, obj_name);
//---
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
//---
int bars=Quartile*24;
for(int i=0;i<bars;i++)
{
if(TimeHour(iTime(Symbol(),PERIOD_H1,i))==TimeH)
{
WindowRedraw();
ObjectCreate(current_chart_id, obj_name + IntegerToString(i),OBJ_VLINE,0,iTime(Symbol(),PERIOD_H1,i),0);
}
if(i == bars-1)
{
WindowRedraw();
ObjectMove(current_chart_id, obj_name + IntegerToString(i), 1, iTime(Symbol(),PERIOD_H1,i), 0);
}
}
//--- return value of prev_calculated for next call
return(rates_total);
}
//+------------------------------------------------------------------+
it does not redraw. i want to redraw lines when the circle ends.
I am sorry i do not know where or when the circle ends.
In fact i can not see any circle at all.
I do not know what you mean by circle.
Also i have no idea about what you are trying to accomplish.
I am sorry i do not know where or when the circle ends.
In fact i can not see any circle at all.
I do not know what you mean by circle.
Also i have no idea about what you are trying to accomplish.
:))))))))))))))))))))))))))))))))
Last mounth I had 82% customers that explains tasks like him. When I asked questions about task they thought that I am trolling them:))))))))))))
:))))))))))))))))))))))))))))))))
Last mounth I had 82% customers that explains tasks like him. When I asked questions about task they thought that I am trolling them:))))))))))))
I know thats why i ask them to be specific.
you can just use
ObjectsDeleteAll();
And then simply draw a new 10 line structure so that it's up to date.
Just compare the last 10hr bar with new 10hr bar time and whenever they differ create new lines, then overwrite the bar time with the new value and wait for the next new 10hr bar.
you can just use
And then simply draw a new 10 line structure so that it's up to date.
Just compare the last 10hr bar with new 10hr bar time and whenever they differ create new lines, then overwrite the bar time with the new value and wait for the next new 10hr bar.
Where end how use ObjectDeleteAll()? look at code and if you can please help and fix it.
int bars=10*24;
for(int i=0;i<=bars;i++)
{
if(TimeHour(iTime(Symbol(),PERIOD_H1,i))==10)
{
ObjectCreate(current_chart_id, obj_name + IntegerToString(i),OBJ_VLINE,0,iTime(Symbol(),PERIOD_H1,i),0);
}
if(i == bars-1)
{
ObjectMove(current_chart_id, obj_name + IntegerToString(i), 1, iTime(Symbol(),PERIOD_H1,i), 0);
}
}