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

[amibroker] array question



PureBytes Links

Trading Reference Links

hi,
 
i should know this but can't figure it out at this moment.
 
I am working on daytrade systems (1 minute timeframe) and want to include a constraint not to buy for the first hour  IF  there is a gap up.
 
I have 3 times:
 
startTime = 153000;
endTime = 220000;
gapUpTime = 163000;
the gap I calculate at the first bar of the day as follows:
 
closePrice = IIf(TimeNum() == endTime,C,0);
startPrice = IIf(TimeNum() == startTime,O,0);
deltaPrice = startPrice - Ref(closePrice,-1);
deltaPerc = deltaPrice / IIf(Ref(closePrice,-1),Ref(closePrice,-1),1) * 100;
 
now deltaPerc is an array containing the percentage change at the first bar of the day with respect to the last bar of the previous day (assuming all bars contain data).
 
If deltaPerc > 0.5 I only want to allow buying after gapUpTime. How can it be done?
 
thx, Ed
 
 

__._,_.___

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

__,_._,___