PureBytes Links
Trading Reference Links
|
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.
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:amibroker-digest@xxxxxxxxxxxxxxx
mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> To unsubscribe from this group, send an email to:
amibroker-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|