Hello, complete AFL newbie here.  This should be a simple one.  If I 
have a system whereby a 3-bar MA crosses another MA to buy, and a 3-
bar MA crosses a different MA to sell, how would I code the 
optimization to find the most profitable COMBINATION of MAs for the 
buy and sell?  

Here's how I attempted to do it--I know it's wrong, as it crunched 
numbers for about 2 hours but then gave me results that made no sense:


MA1 = Optimize ( "MA", 50, 5, 200, 1 );
MA2 = Optimize ( "MA", 50, 5, 200, 1 );

Buy =   MA( Close , 3 )  >  MA( Close , MA1 );

Sell =  MA( Close , 3 )  <  MA( Close , MA2 );

Short = 0;

Cover = 0;


Thanks in advance for your patience and help.

Reply via email to