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

Re: [amibroker] Entry Time Delay



PureBytes Links

Trading Reference Links

Also tried:
BarsSinceExit = Min(BarsSince(Sell),BarsSince(Cover));

Added to Buy and Short lines:

AND (BarsSinceExit > 0);

This should have gotten me in on the next 5 minute bar.  No luck with this procedure either.  I'm missing something in my programming logic.

 

 
----- Original Message -----
From: jjj_98
Sent: Thursday, June 28, 2007 11:04 AM
Subject: [amibroker] Entry Time Delay

After exiting a trade I want to wait 5 minutes before re-entering a
trade so here's what code I've tried but it does not seem to be
making a difference in the next entry. Do you see any problems?

//Initialize last trade exit times

LastSellTime = LastCoverTime = 000000;

// Calculates Amount of time since last exit

TimeSinceLastTrade = Min((TimeNum() - LastSellTime),(TimeNum() -
LastCoverTime));

// I added this to my BUY and SHORT instructions so that the time to
re-enter the next trade must be greater than 5 minutes.

AND (TimeSinceLastTrade > 000500);

//In my logic added the following to get the time of the Last Sell
and Last Cover

if(Sell[i] == 1)
{
LastSellTime = TimeNum();
}

if(Cover[i] == 1)
{
LastCoverTime = TimeNum();
}

__._,_.___

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





SPONSORED LINKS
Investment management software Investment property software Investment software
Investment tracking software Return on investment software

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

__,_._,___


Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool.