Just for reference :
1.Recognize first InsideBar,get the BarIndex;
2.Call function N=NBreakInside(BarIndex).
int NBreakInside(int MyTF,int MyShift) // surely MyShift>=1
{
double PH=iHigh(NULL,MyTF,MyShift);
double PL=iLow (NULL,MyTF,MyShift);
for(int i=MyShift-1;i>=0;i--)
{
if(iHigh(NULL,MyTF,i)>PH || iLow(NULL,MyTF,i)<PL)
{
return(MyShift-i);
}
}
return(0);
}
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
With my code below I can identify Bar 6 on the image above. How do I calculate that Bar 5 4 3 2 1 is still inside bar 7 ?