_SECTION_BEGIN("Trades");
SetPositionSize( 50, spsShares);
B1=Cross(K,75);
B2=KH>DH OR KH<25;
B3=Cross(K,D) AND K>75;
Buy=B2 AND (B1 OR B3);
Sell=Cross(D,K);
S1=Cross(25,K);
S2=KH<DH OR DH>75;
S3=Cross(D,K) AND D<25;
Short=S2 AND ( S1 OR S3);
Cover=Cross(K,D);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorOrange ),0, IIf( Buy, K, D ), IIf( Buy, -5, -15 ) );
shape1 = Cover * shapeUpArrow + Short * shapeDownArrow;
PlotShapes( shape1, IIf( Cover, colorPaleGreen, colorRed ),0, IIf( Cover, D, K ), IIf( Cover, -15, -5 ) );
Buy=ExRem(Buy,Sell);
Sell= ExRem(Sell,Buy);
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
_SECTION_END();
k, D, KH, Dh are already defined and is working. I get excess signals for sell and cover in spite of exrem. How to remove them.
pic is below
http://imageshack.us/photo/my-images/12/mwsnap042.jpg
SetPositionSize( 50, spsShares);
B1=Cross(K,75);
B2=KH>DH OR KH<25;
B3=Cross(K,D) AND K>75;
Buy=B2 AND (B1 OR B3);
Sell=Cross(D,K);
S1=Cross(25,K);
S2=KH<DH OR DH>75;
S3=Cross(D,K) AND D<25;
Short=S2 AND ( S1 OR S3);
Cover=Cross(K,D);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorOrange ),0, IIf( Buy, K, D ), IIf( Buy, -5, -15 ) );
shape1 = Cover * shapeUpArrow + Short * shapeDownArrow;
PlotShapes( shape1, IIf( Cover, colorPaleGreen, colorRed ),0, IIf( Cover, D, K ), IIf( Cover, -15, -5 ) );
Buy=ExRem(Buy,Sell);
Sell= ExRem(Sell,Buy);
Short = ExRem(Short,Cover);
Cover = ExRem(Cover,Short);
_SECTION_END();
k, D, KH, Dh are already defined and is working. I get excess signals for sell and cover in spite of exrem. How to remove them.
pic is below
http://imageshack.us/photo/my-images/12/mwsnap042.jpg