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

Re: [amibroker] Is there a WAIT-type function?



PureBytes Links

Trading Reference Links

Thanks for the replies.

When using  Buy = ref(mybuycondition,-1); I am referencing yesterday's mybuycondition. My problem is getting to tomorrow to reference y'days mybuycondition in a backtest. (gawd, that sounds confusing :-)

The date/time and static variables seem very interesting though. I'll have to do some reading on them.

Thanks for all the help...
 
There are Time and Date functions to allow making decisions wrt date&time. For example DateNum(), TimeNum(), Now(), Minutes(), Seconds(), etc.
 
To know tomorrow whether a condition was true during a previous run you can use StaticVariables, see StaticVarSet() and StaticVarGet(). These variables will retain their values regardles of whether you shut down and power up your compurter. For example to know that you started a new day you could use NewDay = DateNum() != ref(DateNum(),01);
 
There are also ParamDate() and ParamTime() function that allow you to manually change the Date/Time parameters for your conditions.
 
best regards,
herman


Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html




Yahoo! Groups Links