Need help in exploration

cmp=Close;
pc=Ref(Close,-1);
tv=Volume;
pv=Ref(Volume,-1);
to=OpenInt;
po=Ref(OpenInt,-1);



P1=cmp>pc;
P2=CMP<PC;
V1=tv>pv;
V2=TV<PV;
O1=to>po;
O2=TO<PO;
STRONG=CMP>PC AND TV>PV AND TO>PO;
WEAK=CMP<PC AND TV>PV AND TO>PO;

STRONG=CMP<PC AND TV<PV AND TO<PO;
WEAK=CMP>PC AND TV<PV AND TO<PO;

Filter = STRONG OR WEAK;
	
AddColumn( IIf( Strong, 66,83 ), "Signal", formatChar, 1, bkcolor =IIf (Strong,colorGreen, colorred ));
//AddColumn( IIf( Strong1, 66,83 ), "Signal", formatChar, 1, bkcolor =IIf (Strong1,colorGreen, colorred ));
	
AddTextColumn( WriteIf( P1, "Rising", "Down" ), "Price"  , 1, colorBlack, colorLightGrey, 70);
AddTextColumn( WriteIf( V1, "Rising", "Down" ), "Volume" , 1, colorBlack, colorLightGrey, 70);
AddTextColumn( WriteIf( O1, "Rising", "Down" ), "OI"	 , 1, colorBlack, colorLightGrey, 70);
//AddTextColumn( WriteIf( M1, "Strong", "Weak" ), "Market" , 1, colorBlack, colorLightGrey, 70);

/*
I NEED HELP, I HAVE MAKE LITTLE AFL, BUT AT ONE PLACE CONFUSSION.
NEED TO CHANGE SOME CHANGE IN MY AFL, BUT I DON'T KNOW HOW, SO PLEASE HELP ME..
*/
Ami photo_2018-10-07_18-00-32

You failed to acknowledge my posts in another thread although you're using my presented code except to mention it as erroneous when already specified as partial code.
These things make me laugh nowadays :smiley:

Anyway, this is also untested code, not running AB today but you can check.

cmp=Close;
pc=Ref(Close,-1);
tv=Volume;
pv=Ref(Volume,-1);
to=OpenInt;
po=Ref(OpenInt,-1);

P1=cmp>pc;
V1=tv>pv;
O1=to>po;

SG = (P1 AND V1 AND O1)              OR  ((NOT P1) AND (NOT V1) AND (NOT O1));
WK = (P1 AND (NOT V1) AND (NOT O1))  OR  ((NOT P1) AND V1 AND O1);
Filter = SG OR WK;
	
AddColumn( IIf( SG, 66,83 ), "Signal", formatChar, 1, bkcolor =IIf (SG,colorGreen, colorRed ));
AddTextColumn( WriteIf( P1, "Rising", "Down" ), "Price"  , 1, colorBlack, colorLightGrey, 70);
AddTextColumn( WriteIf( V1, "Rising", "Down" ), "Volume" , 1, colorBlack, colorLightGrey, 70);
AddTextColumn( WriteIf( O1, "Rising", "Down" ), "OI"	 , 1, colorBlack, colorLightGrey, 70);
AddTextColumn( WriteIf( SG, "Strong", "Weak" ), "Market" , 1, colorBlack, colorLightGrey, 70);

EDIT: I'm sure you'll not be aware of PRECEDENCE in Operators so used a lot of parenthesis in the condition checks.

1 Like