// Example6A.afl
// A trading system based on the
// crossover of two moving averages.
// Buy when the faster moving average
// crosses up through the slower moving
// average.
// Sell when the faster moving average
// crosses down through the slower
// moving average
FastMA = MA( C, 5 );
SlowMA = MA( C, 20 );
Buy = Cross( FastMA, SlowMA );
Sell = Cross( SlowMA, FastMA );
// Example6A.afl
// A trading system based on the
// crossover of two moving averages.
// Buy when the faster moving average
// crosses up through the slower moving
// average.
// Sell when the faster moving average
// crosses down through the slower
// moving average
FastMA = MA( C, 5 );
SlowMA = MA( C, 20 );
Buy = Cross( FastMA, SlowMA );
Sell = Cross( SlowMA, FastMA );
Short= Cover = False;
1 Like
Did you try the suggested change in 'Settings'?
(Analysis Settings > General Tab > Positions).
1 Like
You would do yourself a BIG favor if you actually READ what you posted yourself. The image you have included, already contains the answer. Just READ it (to the end, not just first sentence). The answer is in 3rd sentence.