Thanks for the tip, Amitrandive. And I dont mean to sound rude, but... well, I didnt ask about the trade system itself, but about programming a condition for the computer to acknowledge it as a buy or a sell. I'm trying to learn AFL so I can automatize (or make it automatic, sorry for the bad english) what I do manually everyday. And, no, this is not the system that I use to trade. It is just an simple example so I can learn how to instruct the computer.
Isnt it possible to make the computer buy when the conditions I want occur in the chart?
1 - linear regression is pointing upward;
2 - prices are above the MA;
3 - prices touch the MA;
The computer cant make it? Amibroker cant make it? I didnt understand KelvinHand because I didnt know what his statement had to do with coding itself.
But if what you two mean is that amibroker cant handle these conditions well (and because of it, it shows errors in the backtest), then its just sad.
But thanks anyway. :thumb: