WC_Buy and WC_Sell

This is the place to discuss EdgeRater Chart Script

Moderator: Chris White

Post Reply
henry1224
Posts: 457
Joined: Wed Feb 24, 2016 12:04 pm

WC_Buy and WC_Sell

Post by henry1224 »

the code for these 2 indicators show up just fine on a chart, but I want to get the first occurrence of the event

so I wrote this into the code

BongoWGreen:= "Bongo()[BongoUp]#WEEK1" > 0;
BongoDGreen:= "Bongo()[BongoUp]" > 0;
F13Green:= "ForceIndex(13)[FI]" > 0;
F2Green:= "ForceIndex(2)[FI]" > 0;
PctB:= "PercentB(20,2)";
PctBGreen:= PctB > 0.7;
BW:= "BandWidth(20,2)[BandWidth]";
BWGreen:= PctB > BW;

CondSum:= BongoWGreen + BongoDGreen + F13Green + F2Green + PctBGreen + BWGreen;

long:= CondSum >=4;
Event:Long==1 & Not(Ref(Long,1));

now it gives me the first occurrence on a chart

now for the problem, when I use the entries and exit tabs and enter the indicator and run the code, in the results tab , I get every stock and every date to show up ! What am I doing wrong
hayuride
Posts: 4
Joined: Fri Mar 11, 2016 5:25 pm

Re: WC_Buy and WC_Sell

Post by hayuride »

Hi Henry,

Try this...

Cond1:= CondSum >=4;
Cond2:= Not(Ref(Cond1,1));
Event:Cond1 & Cond2;

Seem ok on my end...
Post Reply