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

RE: [amibroker] Plot ATR for backtest - Unable to see the plot



PureBytes Links

Trading Reference Links

Copied your afl.  Plot works fine with white background. Do you have perhaps a colorDarkGreen ro dark background. Change background to something light and it should show.

 

From: amibroker@xxxxxxxxxxxxxxx [mailto:amibroker@xxxxxxxxxxxxxxx] On Behalf Of srengret
Sent: Monday, March 30, 2009 5:12 AM
To: amibroker@xxxxxxxxxxxxxxx
Subject: [amibroker] Plot ATR for backtest - Unable to see the plot

 

I'm using Amibroker 5.10.
I'm writing code to set a trailing stop at 3* ATR. I'm trying to plot 3 *ATR as a line to see this, yet I'm unable to plot it after checking references and modifying the code.
The code worked fine using the ApplyStop for a 7% trailing stop. I commented it out to use the 3*ATR. Also, green buy arrows and red sell arrows showed okay.
I imagine I've overlooked something obvious - maybe it is positioning of the 3*ATR line. I just don't know.
I used a purchase of PZT (Powershares ETF) on 9/11/2008 as a check to see the line, but it didn't show.
Would someone look at the code below and tell me what is wrong with it?

Buy =
C > 5.0 AND
ROC(C,10) > 0 AND
PDI(10) > MDI(10) AND
ADX(10)>22 AND
C > EMA(C,10) AND
EMA(C,10) > EMA(C,20);

Sell=0;
//Trailing Stop at 7% Loss
//ApplyStop(2,1,7,1,False,1);
//Equity(1,0); //ThIS EVALUATES STOPS
//Plot(Sell==4,"ApplyStop Sell",colorRed,4|styleOwnScale);//4 is for trailing stops
//Sell = 1.10*Buy;

//Using ATR
ApplyStop(2,2,3*ATR(10), 1, False,1) ;
Equity(1,0); //ThIS EVALUATES STOPS
Plot(Sell==4,"ApplyStop Sell",colorRed,4|styleOwnScale);//4 is for trailing stops

//Plot ATR
Plot (C-(3*(ATR(10))), "c-3*ATR(10)", colorDarkGreen);

Thanks.



__._,_.___


**** IMPORTANT PLEASE READ ****
This group is for the discussion between users only.
This is *NOT* technical support channel.

TO GET TECHNICAL SUPPORT send an e-mail directly to
SUPPORT {at} amibroker.com

TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
http://www.amibroker.com/feedback/
(submissions sent via other channels won't be considered)

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/





Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___