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

Re: [amibroker] Need Help



PureBytes Links

Trading Reference Links

Jim,

After your RS=IIf(Trend == 1,14,IIf(Trend == 2,7, 4)); statement add the
following:

RS=lastvalue(RS);

Best wishes
Anthony
/*******************************/
Bull=9;

Bear=-3;

Trend = IIf(Bull<ROC(EMA(C,50), 14),1,IIf(Bear<ROC(EMA(C,50), 14),2,3));

//xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

B =IIf(Trend == 1,17,IIf(Trend == 2,63, 22));

S =IIf(Trend == 1,58,IIf(Trend == 2,79, 83));

RS=IIf(Trend == 1,14,IIf(Trend == 2,7, 4));
RS=Lastvalue(RS);//****Added***


Filter=1;

AddColumn(Trend,"Trend");

AddColumn(B,"B");

AddColumn(S,"S");

AddColumn(RS,"RS");

AddColumn(ROC(EMA(C,50), 14),"ROC");



StochRsi=EMA((RSI(RS)-LLV(RSI(RS),8))/(HHV(RSI(RS),8)-LLV(RSI(RS),8)),3)*100;



Buy=Cross(B,StochRsi) AND ADX(14) > 20 AND RSI(4)<50;

Sell=Cross(StochRsi,S)AND ADX(14) > 13 AND RSI(4)>50;

Short=Sell;Cover=Buy;



>                    Yahoo! Groups Sponsor
                        ADVERTISEMENT


>
> Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx
> (Web page: http://groups.yahoo.com/group/amiquote/messages/)
>
> Check group FAQ at:
> http://groups.yahoo.com/group/amibroker/files/groupfaq.html
>
> Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


Post AmiQuote-related messages ONLY to: amiquote@xxxxxxxxxxxxxxx 
(Web page: http://groups.yahoo.com/group/amiquote/messages/)

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/