I tried the code below but it did not work. I'm not sure why it looks fine to me.....
The idea here is that on each new bar, it checks for whether the high of this bar was higher than the high of the last bar, and continues checking this for the last x bars (hence int i increases from o to 1 less than x and it runs the High check and if the High check is true it adds to count)
protected override void OnBarUpdate()
{
int count = 0;
for (int i = 0; i < x; i++)
{
if (High[i] >= High[i+1]) {count ++;};
}
if ( count >= x) {isHH = true; count = 0;}
else {isHH = false; }
if (isHH)
{ EnterLong(DefaultQuantity, "");}
Can anyone offer some help with this .... I would normally debug this kind of code in VisualStudio but I dunno if it's possible at all to debug NT code (anyone know how to do this?)
Thanks!

Comment