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

Re: [amibroker] DateTime() Filter???



PureBytes Links

Trading Reference Links



Give this a try.  Notice use of '>'.

ConditionB = DayOfWeek() == 5 AND TimeNum()>=173000;
ConditionA != ConditionB;


christianvost wrote:
 

SetTradeDelays(0,0,0,0);
BuyPrice = C;
SellPrice = C;
ShortPrice = C;
CoverPrice = C;

Hello,

I have tried to block trades on Friday after 5.30pm. But it seems to block all trades on friday, and all trades at 5.30pm. I also want to force an exit on Friday at 5.30pm (if a position is open). The code below is wrong??? Can anyone help, please!!!

ConditionA = (DayOfWeek() != 5 AND TimeNum()!=173000);
ConditionB = (DayOfWeek() == 5 AND TimeNum()==173000);

Buy = Cross(TimeFrameExpand(SumRsi,2*in15Minute),TimeFrameExpand(RSICMA,2*in15Minute)) AND ConditionA;
Sell = Cross(TimeFrameExpand(RSICMA,2*in15Minute),TimeFrameExpand(SumRsi,2*in15Minute)) OR ConditionB;
Short = Cross(TimeFrameExpand(RSICMA,2*in15Minute),TimeFrameExpand(SumRsi,2*in15Minute)) AND ConditionA;
Cover = Cross(TimeFrameExpand(SumRsi,2*in15Minute),TimeFrameExpand(RSICMA,2*in15Minute)) OR ConditionB;



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





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

__,_._,___