Re: [amibroker] Vertical Lines on X Signal

2010-05-26 Thread Vishvesh
Ara thanks so much for ur quick response. Its working well. Regards Vishvesh On Wed, May 26, 2010 at 9:37 PM, Ara Kaloustian wrote: > > > MACDsignal = Cross(MACD,MACDsig); > Plot(MACDSignal,"vertical line",colorred,stylehistogram|styleownscale,0,1); > > To transfer signal to price pane use stat

[amibroker] Re: number of consecutive closes above or below a MA

2010-05-26 Thread Mike
And yes, I recognize (after the fact) that I could have just changed > to <=. Mike --- In amibroker@yahoogroups.com, "Mike" wrote: > > I was thrown by the incorrect comment of your earlier post, where it should > have read "below", instead of "above". > > BarsSince( C> MA( C, 50 ) ); // numbe

[amibroker] Re: number of consecutive closes above or below a MA

2010-05-26 Thread Mike
I was thrown by the incorrect comment of your earlier post, where it should have read "below", instead of "above". BarsSince( C> MA( C, 50 ) ); // number of consecutive closes above MA Guided by the comment, you would have had to use Cross instead of '>', and I ran with it from there. Otherwi

Re: [amibroker] Re: number of consecutive closes above or below a MA

2010-05-26 Thread NickT
Tomasz, Mike, Thank you for your help. It is simple and it works. Nick On Wed, May 26, 2010 at 5:05 PM, Tomasz Janeczko wrote: > > > Hello, > > > "That won't do it. " > > Or really? Did you bother to check? > The code below (that is logically the same as I posted earlier) gives same > results

Re: [amibroker] Re: number of consecutive closes above or below a MA

2010-05-26 Thread Tomasz Janeczko
Hello, "That won't do it. " Or really? Did you bother to check? The code below (that is logically the same as I posted earlier) gives same results as your formula. So you don't need cross, nor flip. Nothing. Counting barssince opposite condition was true is perfectly enough. |MAC = MA(*Close

[amibroker] Re: number of consecutive closes above or below a MA

2010-05-26 Thread Mike
That won't do it. But, this will: MAC = MA(Close, 50); CrossOver = Cross(Close, MAC); CrossUnder = Cross(MAC, Close); Above = Flip(CrossOver, CrossUnder); Below = Flip(CrossUnder, CrossOver); Consecutive = IIf(Above, BarsSince(CrossOver) + 1, BarsSince(CrossUnder) + 1); Plot(IIf(Above, Consecutiv

Re: [amibroker] Value for Type field in Application.Import via OLE?

2010-05-26 Thread Tomasz Janeczko
Hello, This field should be set to zero (zero means "ascii importer"). It is for forward compatibility. Best regards, Tomasz Janeczko amibroker.com On 2010-05-26 23:37, ovtrad...@ymail.com wrote: > What do I pass for the Type field in this API call: > > Application > Function Import(ByVal Type

RE: [amibroker] Re: Backtesting vs. Live Trade Reports

2010-05-26 Thread Lionel Issen
Mike, thanks for your quick response. I think I misunderstood part of your posting. Lionel From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of Mike Sent: Wednesday, May 26, 2010 4:47 PM To: amibroker@yahoogroups.com Subject: [amibroker] Re: Backtesting vs. Li

[amibroker] Re: Backtesting vs. Live Trade Reports

2010-05-26 Thread Mike
Lionel, I'm not sure what those graphic attachments are. I did not include any graphics with my message, nor do I include any kind of signature to my posts. What I did do, however, was cut and paste amibroker code using the Rich Text Editor of the forum's web based client. I suspect that is wha

[amibroker] Value for Type field in Application.Import via OLE?

2010-05-26 Thread ovtrad...@ymail.com
What do I pass for the Type field in this API call: Application Function Import(ByVal Type As Integer, ByVal FileName As String, [ByVal DefFileName As Variant]) As Long If it matters, I will be passing a DefFileName parameter as well. I couldn't find this in the docs anywhere, and I'm afraid

Re: [amibroker] number of consecutive closes above or below a MA

2010-05-26 Thread Tomasz Janeczko
BarsSince( C > MA( C, 50 ) ); // number of consecutive closes above MA On 2010-05-26 18:19, NickT wrote: I need help to find out the number of consecutive times that the price closed above or below a MA. Thanks Nick

[amibroker] Re: Radians to Degrees

2010-05-26 Thread jollypollyanna
--- In amibroker@yahoogroups.com, "Barbara L. DuBroff" wrote: > > pi = 4 * atan(1); //pi > rtd = 180/pi; //radians to degrees > dtr = pi/180; //degrees to radians > Yes thanks Barbara we got that but the degrees on the chart aren't correct. Pi = 3.14159265 * atan(1); // Pi SlopeAngle = atan(b

Re: [amibroker] Radians to Degrees

2010-05-26 Thread Barbara L. DuBroff
pi = 4 * atan(1); //pi rtd = 180/pi; //radians to degrees dtr = pi/180; //degrees to radians - Original Message - From: jollypollyanna To: amibroker@yahoogroups.com Sent: May 26, 2010 3:35 PM Subject: [amibroker] Radians to Degrees --- In amibroker@yahoogroups.com, "Joe

[amibroker] Radians to Degrees

2010-05-26 Thread jollypollyanna
--- In amibroker@yahoogroups.com <../../../../post?postID=lXWmuHpeKWzWklZ8seEg-jJcyQKajAnW__sn0GDSknDCvfG\ S2rPrLYup5HHdLB9Ctgj4gql-L5fnfGwM5L1hAA> , "Joe Landry" wrote: > Try this and see if it works for you. The angle that gets printed in the title by the WriteVal looks about right but how can

[amibroker] Re: Linear Regression Angle

2010-05-26 Thread jollypollyanna
--- In amibroker@yahoogroups.com, "Joe Landry" wrote: > Try this and see if it works for you. The angle that gets printed in the title by the WriteVal looks about right but how can you tell when both scales of the display are changeable. My understanding is the slope of the regression is not rel

[amibroker] Re: AddToComposite in Porfolio backtest question

2010-05-26 Thread mkecera
Got it! SetOption("UseCustomBacktestProc", True ); if( Status("action") == actionPortfolio ) { bo = GetBacktesterObject(); bo.Backtest(); eq = Foreign("~~~EQUITY","C"); AddToComposite( eq, "~EQUITY_"+WriteVal(P1,1.0)+WriteVal(P2,1.0), "X", atcFlagEnableInPortfolio | atcFlagDefaults ); } ---

[amibroker] number of consecutive closes above or below a MA

2010-05-26 Thread NickT
I need help to find out the number of consecutive times that the price closed above or below a MA. Thanks Nick

Re: [amibroker] Vertical Lines on X Signal

2010-05-26 Thread Ara Kaloustian
MACDsignal = Cross(MACD,MACDsig); Plot(MACDSignal,"vertical line",colorred,stylehistogram|styleownscale,0,1); To transfer signal to price pane use static variables StaticVarSet("MACDsignal",MACDsignal); in price pane use MACDsignal = StaticVarGet("MACDsignal"); Plot(MACDSignal,"vertical line",

[amibroker] AddToComposite in Porfolio backtest question

2010-05-26 Thread mkecera
Dear All, I am trying to use AddToComposite to create a new ticker with portfolio back-test equity after each optimization run. I haven't been able to create it using back-test. I tried to add the following line to my strategy code but wasn't successful. Can anybody please point me in the right

Re: [amibroker] two symbols two panes at once

2010-05-26 Thread Inquisitive Voyager
(1)file->new->default chart (2)choose the different symbol (3)window->tile horizontally On Wed, May 26, 2010 at 5:53 PM, MarkK wrote: > > > *I need some help- sure this is easy to do however never did it and > cannot find where in the manual it is* > > * * > > *Want to put up two panes at the s

[amibroker] Vertical Lines on X Signal

2010-05-26 Thread Vishvesh
Hello friends, I want to plot vertical lines on each occasion when MACD Crosses its trigger line. That vertical line should plot in price window also. Request all of you to kindly help me in this. Regards Vishvesh

RE: [amibroker] Re: two symbols two panes at once

2010-05-26 Thread MarkK
Thank you that was it MarkK From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of jollypollyanna Sent: Wednesday, May 26, 2010 10:48 AM To: amibroker@yahoogroups.com Subject: [amibroker] Re: two symbols two panes at once --- In amibroker@yahoogroups.com

[amibroker] Re: two symbols two panes at once

2010-05-26 Thread jollypollyanna
--- In amibroker@yahoogroups.com, "MarkK" wrote: > > Want to put up two panes at the same time > > Two different symbols at the same time > > Both panes showing the same chart > Thank you for your help > MarkK Hi mate. Type "windows" into the "search" box of Amibroker 5.30 User's Guide and th

[amibroker] Re: Switching Optimization Variable from backtest code

2010-05-26 Thread sdwcyberdude
This is wonderful code, thank you! I modified as below function CondOptimize( Var, def, start, end, inc ) { Option = ParamToggle( "Optimize - " + Var, "No,Yes", 1 ); // If option, optimize the designated variable // Else return the default if ( Option ) res = O

RE: [amibroker] Re: Backtesting vs. Live Trade Reports

2010-05-26 Thread Lionel Issen
Mike: Where can I see your graphic(s)? Lionel From: amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] On Behalf Of ovtrad...@ymail.com Sent: Wednesday, May 26, 2010 5:55 AM To: amibroker@yahoogroups.com Subject: [amibroker] Re: Backtesting vs. Live Trade Reports Mike -

[amibroker] CBT: scaling-in only twice

2010-05-26 Thread engineering_returns
Hello, I'm using mid-level CBT and scaling-in and would like to avoid scaling-in more than twice. Is there a way in AFL to figure out how many times i scalled into this trade before? Thanks for your help! Frank engineering-returns.com

[amibroker] Re: Low Level CBT and detailed portfolio report

2010-05-26 Thread engineering_returns
According to AmiBroker support that's not possible: "Detailed log is available in high/mid level custom backtest only - in low-level you need to provide the necessary output yourself with RawTextOutput function." Frank engineering-returns.com --- In amibroker@

[amibroker] two symbols two panes at once

2010-05-26 Thread MarkK
I need some help- sure this is easy to do however never did it and cannot find where in the manual it is Want to put up two panes at the same time Two different symbols at the same time Both panes showing the same chart Can someone tell me where in the manual this may be or post how I can

[amibroker] Re: Backtesting vs. Live Trade Reports

2010-05-26 Thread ovtrad...@ymail.com
And here's what I settled on. Tacking this code on the end of my formula and running it as an exploration satisfies my requirements: Equity(1); function formatexitarray(in, def) { //1=normal exit, default character used, X=stop, P=profit target, T=trailing stop, N=n-bar retu

[amibroker] Re: Backtesting vs. Live Trade Reports

2010-05-26 Thread ovtrad...@ymail.com
Mike -- thanks for taking the time to do this, it looks like that will do the trick. Will check it out. ovt --- In amibroker@yahoogroups.com, "Mike" wrote: > > Hi, > If you want to see the effects of stops, scaling, etc. then you can try > embedding a call to Equity in your script. Here's a

[amibroker] Re:OT: RMath plug-in for Amibroker - Installation Issues

2010-05-26 Thread vlanschot
Please ignore this e-mail which I'd sent before message # 149701. PS --- In amibroker@yahoogroups.com, "vlanschot" wrote: > > An update: I have sent Tomasz a new binary (DLL) which he will upload to the > usual place on the AB-site, hopefully soon. This version should solve this > issue as wel

[amibroker] Re: Changes to default.awl layout leaking to other databases.

2010-05-26 Thread rselmanl
All, thank you for your responses. After originally posting renamed the default.awl in the \AmiBroker\Layouts folder. Then any changes in different databases stayed. Made sure in the "Layout" tab the unique defalut.awl file was selected. Will try renaming AmiBroker\Layouts\default1.awl bac

[amibroker] Re: Indicator design (no dots)

2010-05-26 Thread engineering_returns
I found a way to change this with AFL: SetChartOptions(3,0,chartGrid0); Thanks for your help! Frank engineering-returns.com --- In amibroker@yahoogroups.com, Inquisitive Voyager wrote: > > parameter->axes & grid->show middle lines (make it no). > > On Tue, May