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

[amibroker] How to automatically control buy conditions depending on trades per day?



PureBytes Links

Trading Reference Links

Hello
 
    I have an intraday database composed of different stocks. Some 
periods, my fomular gives lots of trades while other periods it gives 
less. I want to dynamically control the buy conditions depending on avg 
trades/per recently. For example, if there are too many trades everyday 
recently (say avg 8 trades/day over last 20 trading days), i will 
choose a tighter buy condition to filter out the non-excellent ones. On 
the other hand, if there r less trades recently(eg avg 2 trades/day), i 
will loose the buy conditions as long as the increased trades give 
positive return on avg. 

  How can I use AFL language to achieve it when I do backtest?

Thanks a lot

Bill