Hello
I have a array with buy signals on 1 minute tiemframe. i am looking 
to find the matching barindex on a higher timeframe. for somereason 
my code does not work

can you help

function returnBarIndex(array)
{
        indx=-1;
        for (i=1; i<BarCount;i++)
                {
                        if(array[i] ==True )
                                {
                                        indx=i;
                                }
                }
        return indx;
}


entryin1Minute=Name()==STOCKNAME AND BarIndex()==ValueWhen((DateNum()
==EntryDate  ) AND (TimeNum()>=EntryTime AND Ref(TimeNum(),-1)
<EntryTime), BarIndex());       
exitin1Minute=Name()==STOCKNAME  AND BarIndex()==ValueWhen((DateNum()
==ExitDate)   AND  (TimeNum()>=ExitTime AND Ref(TimeNum(),-1)
<ExitTime) , BarIndex());
entryin5Minute=TimeFrameCompress( entryin1Minute, in5Minute ); 
EntryBarIndexin5Minute=returnBarIndex(entryin5Minute);
_TRACE("ABTest: " + EntryBarIndexin5Minute);

the trace always returns -1 however i can see the buy and sell 
signals genrated in 1 minute bars.


Reply via email to