
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
I need to mark the Friday bars on my chart with an arrow.
The following code snippets mark every bar instead of just Fridays. Setting the buffer ot zero or null does not seem to prevent the arrow from displaying on the chart.
Does anyone have a clue how to mark just the Friday bars?
Also, is there anyway to display the arrow slightly above or below the bars?
SetIndexBuffer(0,Buf_0); // Assigning an array to a buffer
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,233);
SetIndexEmptyValue(0,0);
counted_bars=IndicatorCounted();
i=Bars-counted_bars-1;
while(i>=0)
{
if(DayOfWeek()==5)
{
Buf_0[i]=Close[i]; // Fridays Close
else
{
Buf_0[i]=0;
}
i--;
}