Hi, I'm new to amibroker..
please someone to advise how i can set buyprice on the next day after get buy signal, and enter the trade if price cross up the previous high when get the buy signal? thanks.
//Candle =
BP = ((O-L)/(H-L + 1e-9 ) >= (2/3) AND C >= O) OR ((C-L)/(H-L + 1e-9 ) >= (2/3) AND C < O);
MS = Ref(C,-2) < Ref(O,-2) AND Ref(O,-1) < Ref(C,-2) AND Ref(O,-1) < O AND Ref(C,-1) < Ref(C,-2) AND Ref(C,-1) < O AND C > (Ref(O,-2)+Ref(C,-2))/2 AND
abs(Ref(C,-1)-Ref(O,-1)) < abs(Ref(C,2)-Ref(O,-2))/2 AND abs(Ref(C,-1)-Ref(O,-1)) < abs(C-O)/2;
//Trading Option
SetOption("InitialEquity", 10000 );
SetTradeDelays( 0, 0, 0, 0);
RoundLotSize = 1;
SetOption("MaxOpenPositions",5);
Range = ATR(20);
RiskPerShare = 1 * Range ;
ApplyStop( stopTypeLoss, stopModePoint, RiskPerShare, True );
PositionRisk = 1;
PctSize = PositionRisk * BuyPrice / RiskPerShare;
SetPositionSize( PctSize, spsPercentOfEquity );
Buy = (BP OR MS) AND MA(C,50) > MA(C,150) AND C > MA(C,200);
Sell = MA(C,50) < MA(C,150);
Buy=ExRem(Buy,Sell);
Sell=ExRem(Sell,Buy);
> Blockquote