Dear experts,
The below afl ( Relative Performance ) is exactly tracking the price movement of the stock. It starts at " 0" range during the price opening and moves furthur based on price movement.
I want to scan the stocks which are above the '0' line and stocks below the '0' line seperately.
Buy = Relative Preformance > 0;
Sell = Relative Preformance < 0;
pls help.
---------------------------------------------------------------------
---------------------------------------------------------------------
_SECTION_BEGIN("Relative Performance");
_N( TickerList = ParamStr("Tickers", "^DJI,MSFT,GE") );
NumBars = 20;
fvb = Status("firstvisiblebar");
Plot( 100 * ( C - C[ fvb ] ) / C[ fvb ], Name(), colorBlue );
for( i = 0; ( symbol = StrExtract( TickerList, i ) ) != ""; i++ )
{
fc = Foreign( symbol, "C" );
if( ! IsNull( fc[ 0 ] ) )
{
Plot( 100 * ( fc - fc[ fvb ] )/ fc[ fvb ], symbol, colorLightOrange + ( (2*i) % 15 ), styleLine );
}
}
PlotGrid( 0, colorYellow );
_N( Title = "{{NAME}} - Relative Performance [%]: {{VALUES}}" );
Buy = fvb > 1;
_SECTION_END();
-----------------------------------------------------------------------
-----------------------------------------------------------------------
rergards,
mohan.
The below afl ( Relative Performance ) is exactly tracking the price movement of the stock. It starts at " 0" range during the price opening and moves furthur based on price movement.
I want to scan the stocks which are above the '0' line and stocks below the '0' line seperately.
Buy = Relative Preformance > 0;
Sell = Relative Preformance < 0;
pls help.
---------------------------------------------------------------------
---------------------------------------------------------------------
_SECTION_BEGIN("Relative Performance");
_N( TickerList = ParamStr("Tickers", "^DJI,MSFT,GE") );
NumBars = 20;
fvb = Status("firstvisiblebar");
Plot( 100 * ( C - C[ fvb ] ) / C[ fvb ], Name(), colorBlue );
for( i = 0; ( symbol = StrExtract( TickerList, i ) ) != ""; i++ )
{
fc = Foreign( symbol, "C" );
if( ! IsNull( fc[ 0 ] ) )
{
Plot( 100 * ( fc - fc[ fvb ] )/ fc[ fvb ], symbol, colorLightOrange + ( (2*i) % 15 ), styleLine );
}
}
PlotGrid( 0, colorYellow );
_N( Title = "{{NAME}} - Relative Performance [%]: {{VALUES}}" );
Buy = fvb > 1;
_SECTION_END();
-----------------------------------------------------------------------
-----------------------------------------------------------------------
rergards,
mohan.