Hi Craig
Another question, I don’t want to enter a trade straight after i exit one if my entry conditions are still valid. I believe it creating some whipsaw trades and i want to test it. I have been trying to use the BarsSince() function but i can’t get it working properly. i set up an array then i added it t my trigger bar in the loop but it’s no good. I tried BarsSince(Sell) also BarsSince(LBIT==0)>5; Thanks
Buy = 0;
Sell = 0;
PriceAtBuy = 0;
LBIT = 0;
LStop = Null;
BuyLevel = Null;
//
BStrade = BarsSince(Sell)>5;
//
for(j = 1; j < BarCount; j++)
{
if(PriceAtBuy==0 AND LE[j] AND BSTrade[j] )
{
Buy[j] = True;
BuyPrice[j] = Open[j];
PriceAtBuy = BuyPrice[j];
LStop[j] = Max(TrailStopUp[j-1],TrailStopUp[j]);
LStop[j-1] = TrailStopUp[j-1];
BuyLevel[j] = BuyPrice[j];
LBIT[j] = 1;
…….
…
..