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

[amibroker] Re: Does settradedelays work in IB when using equity



PureBytes Links

Trading Reference Links

Thank you Tomasz !


--- In amibroker@xxxxxxxxxxxxxxx, "Tomasz Janeczko" <amibroker@xxxx> 
wrote:
> Hello,
> 
> SetTradeDelays works in IB. 
> 
> You should just read carefully the documentation about Equity() 
function:
> http://www.amibroker.com/guide/afl/afl_view.php?name=EQUITY
> 
> Especially about flag == 2 and second comment.
> 
> Best regards,
> Tomasz Janeczko
> amibroker.com
> ----- Original Message ----- 
> From: "leonardot19" <leo.timmermans@xxxx>
> To: <amibroker@xxxxxxxxxxxxxxx>
> Sent: Saturday, December 27, 2003 6:37 PM
> Subject: [amibroker] Does settradedelays work in IB when using 
equity
> 
> 
> > Hello,
> > 
> > I'm trying to keep my IB and BT the same, but I see that
> > when using settradedelays(1,0,0,0) does not produce correct
> > arrows in IB when using plotshapes and equity. The delay
> > is not taken into account when plotted on an indicator. Am I
> > missing something here ? (one could use buy=ref(DSS,-1) but
> > then BT code is not the same anymore)
> > Is there a solution ???
> > 
> > Thanks
> > Leo
> > 
> > A = EMA((Close-LLV(Low,8))/(HHV(H,8)-LLV(L,8)),8)*100;
> > DSS = EMA((A-LLV(A,8))/(HHV(A,8)-LLV(A,8)),1)*100;
> > barcolor=IIf(DSS<10,colorYellow,colorBlue);
> > //Graphics
> > GraphXSpace=5;
> > Plot(C,"DSS",ValueWhen(barcolor!=0,barcolor),styleCandle);
> > 
> > //Backtester settings
> > SetTradeDelays(1,0,0,0);
> > //SetOption("AllowSameBarExit",False);
> > //SetOption("ActivateStopsImmediately",False);
> > //SetOption("AllowPositionShrinking",True);
> > //typeLoss=2;typeProfit=3;typeTrailing=4;typeNBar=6;
> > 
> > //BuyStop=Ref(H*1.005,-1);
> > //Buy=Cross(H,BuyStop) AND (Ref(DSS,-1)<5);
> > //BuyPrice=BuyStop;
> > Buy=Cross(DSS,5);
> > Sell=Cross(98,DSS);
> > //Sell=0;
> > //ApplyStop(stopTypeProfit,stopModePercent,1,True);
> > //ApplyStop(stopTypeTrailing,stopModePercent,3,True);
> > //ApplyStop(stopTypeNBar,stopModeBars,10);
> > Equity(1,0);
> > PlotShapes(IIf(Buy,shapeUpArrow,shapeNone),colorGreen,0,L-0.1*ATR
> > (1));
> > PlotShapes(IIf
(Sell,shapeDownArrow,shapeNone),colorRed,0,H+0.1*ATR
> > (1));
> > 
> > 
> > 
> > Send BUG REPORTS to bugs@xxxx
> > Send SUGGESTIONS to suggest@xxxx
> > -----------------------------------------
> > 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 
> > 
> > Yahoo! Groups Links
> > 
> > To visit your group on the web, go to:
> >  http://groups.yahoo.com/group/amibroker/
> > 
> > To unsubscribe from this group, send an email to:
> >  amibroker-unsubscribe@xxxxxxxxxxxxxxx
> > 
> > Your use of Yahoo! Groups is subject to:
> >  http://docs.yahoo.com/info/terms/ 
> > 
> > 
> >


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 

------------------------ 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
---------------------------------------------------------------------~->

Yahoo! Groups Links

To visit your group on the web, go to:
 http://groups.yahoo.com/group/amibroker/

To unsubscribe from this group, send an email to:
 amibroker-unsubscribe@xxxxxxxxxxxxxxx

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