[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Need HELP with Scan



PureBytes Links

Trading Reference Links

 I have been trying to trade the following Script.
It doesn't give me daily buy sell signals when I use 
the scan function with n last quotes = 1. If I use the
SetTradeDelays(0,0,0,0); BuyPrice = Close; line it will 
give me signals which I could use to buy the following 
open. But I have found that when I download from QP the next 
day the signal on those stock seems to disappear. There must 
be a reason that the scan signals are not working properly.
So WHAT is wrong with my program.
THANKS Ernie

/* 
   UNCHECK Everything 
   PROFIT TARGET = No Target Use TRAILING STOP 
   USE N-BAR STOP = 7  Day EXIT 
*/ 

UB = BBandTop(C,15,2);
LB = BBandBot(C,15,2);
BandPos = (Avg - LB) * 100 /(UB - LB);
CondA = Ref(L,-2) > Ref(L,-1)  
        AND L > Ref(L,-1) 
        AND Ref(UB,-1) < UB       
        AND BandPos < 30;
CondB = MA(C,5) < MA(C,35);
CondC = ((LB - Ref(LB,-1)) / Ref(LB,-1)) * 100 > .8;
PosQty = 1;
SetOption("MaxOpenPositions", PosQty);
PositionSize = -100/PosQty;
PositionScore = RelStrength( "!SPX" ); 
SetTradeDelays(1,1,1,1); BuyPrice = Open;
//SetTradeDelays(0,0,0,0); BuyPrice = Close;
Buy = CondA AND CondB  // AND CondC
      AND MA(Volume,50) > 100000;  
SellPrice = Open;
Sell = 0;                               
ApplyStop( 2, 2, 2 * ATR(14), 2,True); 
ApplyStop( stopTypeNBar, stopModeBars,7, True );
Equity(1,0); // THIS EVALUATES STOPS



Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.5.432 / Virus Database: 268.16.14/637 - Release Date: 1/18/2007 1:03 PM