[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [amibroker] Question on how to use HHV or LLV in a looping function?



PureBytes Links

Trading Reference Links

Cottendepot --
Think about this:

myhighest = HHV(High, 2);
for(i=3; i<BarCount; i++){
   xyz = myhighest[i];
}
Perhaps that is what you wanted?

r1 = HHV(a1, v1)  returns an array, r1, and takes an array, a1, and value, v1, as arguments

therefore myhighest is an array
myhighest[i] is the ith value in myhighest
xyz is also a value.

Personally, I've been programming with 'C' since before either M$ or Borland had 'C' compilers, and it took me about a year before I "got it" for AB arrays.

time to "get" AB arrays = K / time spent programming 'C'.

-- Keith


cottondepot wrote:

Need to use HHV/LLV in a loop:

for (i = 3; i < BarCount; i++)
{
xyz=HHV(High[i],2);
...
}

Obviously that didn't work. In the loop, I'm trying to use the "High"
of the last 2 bars as the "LimitPrice" on an order.

Any pointers would be greatly appreciated.

__._,_.___

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




Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___