PureBytes Links
Trading Reference Links
|
Stephane,
I updated my plugins with your updated Rem, Box, Indicators and
TrailingStop dll's. When I backtest the code below however I get
the following message: "Variable `EnterLong' used without
having been initialized"
Title=Name() + " RemBuy TRAIL" ;
Buy= DayOfWeek()==5 ; /* you must convert it to one bar peak*/
Entryprice= Close;
StopPrice= L;
StopLoss= LLV(L,3);
stop= Optimize("stop", 1, 1, 2, 1 );
Trailstop= IIf( stop==1, L-3*StDev(C,20),
IIf( stop==2, L-3*ATR(30),scCBLLong(5)));
Target= Entryprice+3*ATR(20);
/* you can disable it with an impossible target ( C*1e10) */
Count=100000;
CloseBars=-1;
/* KEEP the ORDER++++*/
scRemBuyTrail
(Buy,Entryprice,StopPrice,StopLoss,TrailStop,Target,Count,CloseBars);
Buy=EnterLong;
Sell=ExitLong;
BuyPrice=Entryprice;
SellPrice=SellPr
/* Plot the # STOPS*/
Plot(ValueWhen(Sell,SellPrice),"",colorYellow,1);
Plot(ValueWhen(Buy,BuyPrice),"",colorWhite,1);
Plot(StopLosspr,"StopLoss",colorRed,1);
Plot(TrailPr,"Trailingprice",colorGreen,1);
Plot(TargetPr,"Targetprice",colorBlue,1);
PlotShapes(IIf(Buy, shapeUpArrow,shapeNone),colorGreen,0,L,-20);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorRed,0,H,-20);
Plot(C,"",1,64);
Any thoughts on what the problem I'm having could be. It is
pretty much the same code from your updated help file.
Thanks,
Rob
--- In amibroker@xxxxxxxxxxxxxxx, "bowbie89" <robm@xxxx> wrote:
> Stephane,
>
> Thanks for your help and contribution. I was away last week and
> today was the first chance I had to check the forum. I will
> download the new files and go to work with them.
>
> Rob
>
>
> --- In amibroker@xxxxxxxxxxxxxxx, "Stephane Carrasset"
> <nenapacwanfr@xxxx> wrote:
> >
> > Rob,
> >
> > I have uploaded the rembuy with a help file in 3rd section
> > the doc is also below
> > ther is only a long side, I'll do the short side tomorrow)
> >
> > stephane
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/GHeqlB/TM
---------------------------------------------------------------------~->
Send BUG REPORTS to bugs@xxxxxxxxxxxxx
Send SUGGESTIONS to suggest@xxxxxxxxxxxxx
-----------------------------------------
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/
|