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

[amibroker] Entry Time Delay



PureBytes Links

Trading Reference Links

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
 
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/