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

Re: [amibroker] No more than 1 trade per day



PureBytes Links

Trading Reference Links

Be careful:
 
 & operator is binary-wise AND.
AND (or && operator) is logical AND.

Best regards,
Tomasz Janeczko
amibroker.com
----- Original Message -----
From: Thomas Z
Sent: Friday, September 30, 2005 2:12 PM
Subject: Re: [amibroker] No more than 1 trade per day

uups, there is one failure in the code.
Should be: Buy = Setup & Otpd;
Regards

Thomas
www.tradingbasis.com


Thomas Z wrote:
Hello Barry,

i also trade forex and have written such code a few months ago.
I have searched my files right now and have found the following code.
Check it out, i have not tested it right now.

Setup = your buy condition;
Tradedate = ValueWhen(setup,DateNum(),1);
LastTradedate =
Ref(Tradedate,-1);
Otpd = Tradedate > Lasttradedate;
//only one trade per day

Buy =  Setup;

Regards

Thomas
www.tradingbasis.com
  


Barry Seeger wrote:

How can I require that there be no more than 1 trade per day?

I’m trading forex, on one currency, and I want to require that if there has been a Buy or Sell today, then take no more trades today.

Something like: Buy = conditions AND DayofWeek() > or < DayofWeek() for last Buy or Sell, but I don’t know how to write it.

The “or <” would allow for Mondays.

Thanks for your help.



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 other support material please check also:
http://www.amibroker.com/support.html





SPONSORED LINKS
Investment management software Real estate investment software Investment property software
Software support Real estate investment analysis software Investment software


YAHOO! GROUPS LINKS