Normal
[code]period = 20; // number of averaging periodsm = MA( Close, period ); // simple moving averageBuy = Cross( Close, m ); // buy when close crosses ABOVE moving averageSell = Cross( m, Close ); // sell when closes crosses BELOW moving averageBuy = Ref( Buy, -0 );Sell = Ref( Sell, -0 );BuyPrice = SellPrice = Close;if( Status( "action" ) == actionExplore ){ Filter = Buy OR Sell; AddColumn( IIf( Buy, BuyPrice, Null ), "Buy", 1.3, colorBlue ); AddColumn( IIf( Sell, SellPrice, Null ), "Sell", 1.3, colorDarkRed );}[/code]
[code]period = 20; // number of averaging periods
m = MA( Close, period ); // simple moving average
Buy = Cross( Close, m ); // buy when close crosses ABOVE moving average
Sell = Cross( m, Close ); // sell when closes crosses BELOW moving average
Buy = Ref( Buy, -0 );
Sell = Ref( Sell, -0 );
BuyPrice = SellPrice = Close;
if( Status( "action" ) == actionExplore )
{
Filter = Buy OR Sell;
AddColumn( IIf( Buy, BuyPrice, Null ), "Buy", 1.3, colorBlue );
AddColumn( IIf( Sell, SellPrice, Null ), "Sell", 1.3, colorDarkRed );
}[/code]
Hello and welcome to Aussie Stock Forums!
To gain full access you must register. Registration is free and takes only a few seconds to complete.
Already a member? Log in here.