Attempt to make Rollover AFL

#1
Dear Friend

Can anyone of you help me with the rollover percentage afl. I have tried to code it but iam unsuccessful in it. If you are successful then you can make this afl public. How do i apply this AFL to all the three watchlists simultaneously. Kindly do the needful at your own convenience.

Here's my attempt

TickerList =InWatchList(37);

if( Status("action") == actionExplore )
{
for( i = 0; ( symbol = StrExtract( TickerList, i ) ) != ""; i++ )
{

A = Foreign( symbol, "OI" );

TickerList =InWatchList(38);

if( Status("action") == actionExplore )
{
for( i = 0; ( symbol = StrExtract( TickerList, i ) ) != ""; i++ )
{

TickerList =InWatchList(39);
B = Foreign( symbol, "OI" );

if( Status("action") == actionExplore )
{
for( i = 0; ( symbol = StrExtract( TickerList, i ) ) != ""; i++ )
{

D = Foreign( symbol, "OI" );

E=B+D;
F=A+B+D;

R=(E/F)*100;

AddColumn(R,"RollOver %",colorGreen,colorBlack);


Filter=OI;
Buy=0;
Sell=0;
 

Similar threads