Re: [amibroker] MACD Predictor

2007-06-18 Thread Ara Kaloustian
George, Your code is asking AB to retreive a value (from the future) that does not exist yet. To find the value of price that will cause a particular event you need to do some math to compute the value. The math in this case would require the equations for the 2 moving averages to be equal, (

[amibroker] Re: Any way to reconfigure the way AB saves templates?

2007-06-18 Thread Lester Vanhoff
Gerald, just try to figure out how to get all this working in the way that it's acceptable for you. With AB there are often many different ways to manage your tasks. In my case, I hardly ever use the mouse and just absolutely hate drag-&-drop and never ever use it with any application, so when

[amibroker] Re: Ami broker and Excel

2007-06-18 Thread vosmerkin.evgen
I've made everything as written here http://finance.groups.yahoo.com/group/amibroker/message/94651 --- In amibroker@yahoogroups.com, vikas soni <[EMAIL PROTECTED]> wrote: > > > hi Vosmerkin, Can u plz elaborate this tht who u joined AmiBroker and Excel to get data in real time. > > Also which P

[amibroker] Re: Ami broker and Excel

2007-06-18 Thread vosmerkin.evgen
I use universal DDE plug-in --- In amibroker@yahoogroups.com, vikas soni <[EMAIL PROTECTED]> wrote: > > > hi Vosmerkin, Can u plz elaborate this tht who u joined AmiBroker and Excel to get data in real time. > > Also which Plugin u use.? > > > "vosmerkin.evgen" <[EMAIL PROTECTED]> wrote:

[amibroker] Re: Need help with formula, please...

2007-06-18 Thread ax_ray2222
GP, thank you for the help, I want to make a continuation of the Displaced MA(28,-14) and with your help it will do this for the last 14 days but it seems that it is verticaly displaced. Is any way we can make this to plot in the continuation of the DMA(28,-14). I'll put here the entire code I

Re: [amibroker] Re: ApplyStop values.

2007-06-18 Thread Rick Osborn
Thanks Graham Rick --- Graham <[EMAIL PROTECTED]> wrote: > equity(1,0); > plot(valuewhen(Cover==4,CoverPrice),"CoverPrice",colorblue); > plot(valuewhen(Sell==4,SellPrice),"SellPrice",colorblue); > > if you have a delay on the exit, then you need to > allow for this in > the valuewhen, here is th

Re: [amibroker] Re: ApplyStop values.

2007-06-18 Thread Graham
equity(1,0); plot(valuewhen(Cover==4,CoverPrice),"CoverPrice",colorblue); plot(valuewhen(Sell==4,SellPrice),"SellPrice",colorblue); if you have a delay on the exit, then you need to allow for this in the valuewhen, here is the exit prices if the exit is 1 bar after the applystop signal equity(1,0)

Re: [amibroker] Re: ApplyStop values.

2007-06-18 Thread Rick Osborn
Yes - I have Equity(1) included What I want to plot is the "actual price" that the system got stopped out at using... for( i = 0; i < BarCount; i++ ) { if(Cover[i] ==4)PlotText( "Short\nStop " + CoverPrice[i], i, L[ i ]-dist[i]*2, colorYellow ,colorBlueGrey); if( Sell[i]==4 ) PlotText( "Long\n

Re: [amibroker] Re: using non array variables in a loop

2007-06-18 Thread Graham
if it has an array identifier, in thos case [bar] then it is processed as an array If not then it is scalar value, but only the last value of scalar values inside a loop will be passed back to the normal AFL, only arrays can have different values to be read after the loop in the AFL. -- Cheers Gr

[amibroker] Re: using non array variables in a loop

2007-06-18 Thread gp_sydney
It's a single number, not an array. I'm not sure how the AFL interpreter decides, but I'm guessing the preprocessor probably scans the file first to see if it's used as an array anywhere and makes it an array if it is, otherwise it makes it a single number. That's just a guess though. GP --- In

Re: [amibroker] A simple improvement to colored Bollinger Bands

2007-06-18 Thread ajay babu
Hi Good idea. I have another idea but it works or not i don't have any idea. It is upto you. You have used same color between the bands irrespective of the price up or down. Can you make it that one when the price is above 20 SMA color between the bands one color (let's say light green) and p

[amibroker] using non array variables in a loop

2007-06-18 Thread xxnospamxx
In the code below, is sellBar1 an array or a scalar? How does afl decide whether to allocate an array? sellBar1 = -100; for (bar = 1; bar < BarCount; bar++) { if (sellTrigger[bar]) { Sell[bar] = 1; sellBar1 = bar; } }

[amibroker] Re: ApplyStop values.

2007-06-18 Thread gp_sydney
Rick, Don't you need a call to Equity(1) in there somewhere to update the cover array with the stop information? For #2, what "this" are you plotting - the ATR function or TrailStop? TrailStop is delayed by a bar because of the Ref( ,-1). GP --- In amibroker@yahoogroups.com, Rick Osborn <[EMAI

[amibroker] Re: IB Controller - GetPendingList

2007-06-18 Thread eric tao
Try this //- stats = "NotYetTransmitted"; // any status if((List = ibc.GetPendingList( 1, stats )) == "") List = "empty"; "List is: " + List; //- BR Eric --- In amibroker@yahoogroups.com, "sono_080" <[EMAIL PROTECTED]> wrote: > > Hello, how can i control that the

[amibroker] Re: Any way to reconfigure the way AB saves templates?

2007-06-18 Thread Gerald Monks
--- In amibroker@yahoogroups.com, "vlanschot" <[EMAIL PROTECTED]> wrote: > > Gerald, > > In case you haven't: > - use Apply indicator from Formula Editor to insert it; > - or from file-tree: right-click on indicator-AFL, then "insert linked" > - I assume you've set your directory in Preferences->A

Re: [amibroker] ApplyStop values.

2007-06-18 Thread Rick Osborn
Anybody --- ricko8294_98 <[EMAIL PROTECTED]> wrote: > I am using the following Applystop code > > ATRSet = Optimize("ATRset",40,10,70,5); > ATRMult = Optimize("AtrMult",4,2,8,1); > TrailStop = Ref(ATR(ATRSet ) * ATRMult ,-1); > ApplyStop(stopTypeTrailing, stopModePoint, > TrailStop, True, T

[amibroker] Re: new to amitrader

2007-06-18 Thread brian_z321
--- In amibroker@yahoogroups.com, "indianguyinny24" <[EMAIL PROTECTED]> wrote: > > Hi all, > > i am looking for some advice and guidance to how to use this > system ...which seems to have quote a respect in various places... > > i have been working with neural netowrk and genetic algorithm for

[amibroker] Re: PLOTTING OUTPUT

2007-06-18 Thread gp_sydney
Gakkhar, For 'n' bars: Formula1 = IIf(Cum(1)>BarCount-n, Formula1, Null); GP --- In amibroker@yahoogroups.com, "Vinay Gakkhar." <[EMAIL PROTECTED]> wrote: > > Dear GP, > > If, instead of 1 bar, I want 2 or 3 bars, what change should I make in the formula? > > gakkhar > > --- Forwarded m

RE: [amibroker] PLOTTING OUTPUT

2007-06-18 Thread Bob Jagow
Enough, already? -Original Message- From: amibroker@yahoogroups.com [mailto:[EMAIL PROTECTED] Behalf Of Vinay Gakkhar. Sent: Monday, June 18, 2007 5:00 PM To: amibroker Subject: [amibroker] PLOTTING OUTPUT Dear GP, If, instead of 1 bar, I want 2 or 3 bars, what change should I make in th

[amibroker] PLOTTING OUTPUT

2007-06-18 Thread Vinay Gakkhar.
Dear GP, If, instead of 1 bar, I want 2 or 3 bars, what change should I make in the formula? gakkhar --- Forwarded message --- From: gp_sydney <[EMAIL PROTECTED]> To: amibroker@yahoogroups.com Cc: Subject: [amibroker] Re: PLOTTING OUTPUT Date: Tue, 19 Jun 2007 04:03:44 +0530 Gakkhar,

[amibroker] PLOTTING OUTPUT

2007-06-18 Thread Vinay Gakkhar.
Dear GP, Thanks. gakkhar --- Forwarded message --- From: gp_sydney <[EMAIL PROTECTED]> To: amibroker@yahoogroups.com Cc: Subject: [amibroker] Re: PLOTTING OUTPUT Date: Tue, 19 Jun 2007 05:06:32 +0530 Gakkhar, Sorry, just realised BarIndex is not a new function - I got confused by the r

[amibroker] Re: PLOTTING OUTPUT

2007-06-18 Thread gp_sydney
Gakkhar, Sorry, just realised BarIndex is not a new function - I got confused by the red star in the help. And according to the help, it may not be accurate if QuickAFL is on, in which case you might need: bi = BarIndex(); Formula1 = IIf(bi-bi[0]==BarCount-1, Formula1, Null); GP --- In amibrok

[amibroker] Re: Need help with formula, please...

2007-06-18 Thread gp_sydney
> Actually, I just noticed there's a new function called BarIndex() Sorry, just realised this is not a new function (got confused by the red star in the help) and that according to the help, it may not be accurate if QuickAFL is on. So if using that, I think you might need: bi = BarIndex(); s5 =

[amibroker] Re: PLOTTING OUTPUT

2007-06-18 Thread gp_sydney
Gakkhar, Just noticed there's a new function BarIndex() that is supposedly faster than Cum(): Formula1 = IIf(BarIndex()==BarCount-1, Formula1, Null); GP --- In amibroker@yahoogroups.com, "Vinay Gakkhar." <[EMAIL PROTECTED]> wrote: > > Dear GP, > > You're right! I should have noticed it myself

[amibroker] A simple improvement to colored Bollinger Bands

2007-06-18 Thread Don Lindberg
For those of you who found the Colored Bollinger Bands useful, I have made a slight change to make it a bit more eye appealing, by coloring area between Bands. Below find the code. Enjoy, Don Lindberg Cut Here - //Colored Bolling

[amibroker] Re: Need help with formula, please...

2007-06-18 Thread gp_sydney
Ray, This should work (using the Close array): s5 = IIf(Cum(1) > BarCount-14, MA(Close, 5), Null); Plot(s5, etc...); Actually, I just noticed there's a new function called BarIndex() which will do the same job: s5 = IIf(BarIndex() >= BarCount-14, MA(Close, 5), Null); GP --- In amibroker@yah

[amibroker] PLOTTING OUTPUT

2007-06-18 Thread Vinay Gakkhar.
Dear GP, You're right! I should have noticed it myself. Many thanks for your guidance. gakkhar --- Forwarded message --- From: gp_sydney <[EMAIL PROTECTED]> To: amibroker@yahoogroups.com Cc: Subject: [amibroker] Re: PLOTTING OUTPUT Date: Tue, 19 Jun 2007 04:03:44 +0530 Gakkhar, My sta

[amibroker] Need help with formula, please...

2007-06-18 Thread ax_ray2222
Hello, I try to plot a SMA(5) only for the last 14 days on the chart, but I can't figure out how to write the formula to do this. Any help is appreciated, Thank you, Ray

[amibroker] Re: PLOTTING OUTPUT

2007-06-18 Thread gp_sydney
Gakkhar, My statement: > Formula1 = IIf(Cum(1)==BarCount, Formula1, Null); Your statement: > formula1 = IIf(Cum(0)==BarCount, formula1, Null); Spot the difference... GP

[amibroker] Automatically Renaming ~~~Equity

2007-06-18 Thread Ken Close
What code will enable me to automatically rename the ~~~Equity result after a backtest? What manual method can be used to "save" equity results for various tests? Thanks for suggestions. Ken

Re: [amibroker] Re: Buysignal + wait

2007-06-18 Thread Thomas Ludwig
I think, another way how to code this is: waitPeriod = 10; triggerPercentage = 1; SetupLong = Hold(C < BBandBot(C, 20, 2), waitPeriod); SetupPriceLong = ValueWhen(SetupLong,H) * triggerPercentage; Buy = Cross(H, SetupPriceLong) AND SetupLong; BuyPrice = SetupPriceLong; Greetings, Thomas > This

[amibroker] bbands close out side and close inside afl - Thanks msg. to Don Lindberg

2007-06-18 Thread tummalaajaybabu
Hi Mr. Don Lindberg Belated thanks to you for providing this AFL. In my opinion this is wonderful afl. You are absolutely right...using this afl as a brick we can play such a wonderful games around stocks. I have tested this and it is effectively working on 1 hr & 4 hr charts perfectly comparing

Re: [amibroker] Problems with GetExtraData from Quotes Plus

2007-06-18 Thread Joe Landry
Don, don't know what's up with your system but GetExtraData works for me, including your clip below when headed with a Filter =1; Joe . - Original Message - From: Don Lindberg To: amibroker@yahoogroups.com Sent: Monday, June 18, 2007 10:38 AM Subject: [amibroker] Problems w

Re: [amibroker] Date/Time: Now + 5 Minutes

2007-06-18 Thread Ara Kaloustian
From: "sono_080" <[EMAIL PROTECTED]> To: Sent: Monday, June 18, 2007 2:04 AM Subject: [amibroker] Date/Time: Now + 5 Minutes > Hello, > > im searching for a timestop for orders via IBController. > > Now is 18.06.2007 11:05:00 > > and i need > > "GTD 20

[amibroker] Problems with GetExtraData from Quotes Plus

2007-06-18 Thread Don Lindberg
I use the GetExtraData fuction to pull almost all of the Quotes Plus Extra Data fields into various Explorations and Indicators. Sample code fllows: AddColumn(GetExtraData("QRS"),"QRS Rank",6.2 ,IIf( GetExtraData ("QRS") >=80, colorGreen, colorOrange )); AddColumn(GetExtraData("EPSRank"),"EPS Ra

[amibroker] PLOTTING OUTPUT

2007-06-18 Thread Vinay Gakkhar.
Dear GP, Here is the whole formula that I was previously using: LastClose = TimeFrameGetPrice( "C", in5Minute, 0) ; // initialize LastClose Last5Min = TimeFrameGetPrice( "C", in5Minute, -1) ; // initialize Last5Min Diff5Min = LastClose-Last5Min ; // initialize Diff5Min Plot (LastClose, "LastClo

[amibroker] PLOTTING OUTPUT

2007-06-18 Thread Vinay Gakkhar.
Dear GP, Here is the whole formula that I was previously using: LastClose = TimeFrameGetPrice( "C", in5Minute, 0) ; // initialize LastClose Last5Min = TimeFrameGetPrice( "C", in5Minute, -1) ; // initialize Last5Min Diff5Min = LastClose-Last5Min ; // initialize Diff5Min Plot (LastClose, "LastClo

[amibroker] ApplyStop values.

2007-06-18 Thread ricko8294_98
I am using the following Applystop code ATRSet = Optimize("ATRset",40,10,70,5); ATRMult = Optimize("AtrMult",4,2,8,1); TrailStop = Ref(ATR(ATRSet ) * ATRMult ,-1); ApplyStop(stopTypeTrailing, stopModePoint, TrailStop, True, True); and want to print out on my chart when the stop kicked in and wha

[amibroker] Re: Buysignal + wait

2007-06-18 Thread gp_sydney
>From a quick look through without trying it, and assuming that Longsetup is a True/False type array, I can't see any reason why it wouldn't work. I could be missing something though. One thing that may need to be considered is whether the Cross function will return True if H and HHV(H,3) are the

Re: [amibroker] Ami broker and Excel

2007-06-18 Thread vikas soni
hi Vosmerkin, Can u plz elaborate this tht who u joined AmiBroker and Excel to get data in real time. Also which Plugin u use.? "vosmerkin.evgen" <[EMAIL PROTECTED]> wrote: I've made DDE connection to Excel. In excel sheet I have fields "Ticker" , "Last", "Hi

Re: [amibroker] New file uploaded to amibroker

2007-06-18 Thread Ton Sieverding
Indeed a very good document. Very helpful ... Thanks, Ton. - Original Message - From: Grant Noble To: amibroker@yahoogroups.com Sent: Monday, June 18, 2007 1:18 AM Subject: Re: [amibroker] New file uploaded to amibroker Nice piece of work. Many thanks for taking the time

[amibroker] Re: Any way to reconfigure the way AB saves templates?

2007-06-18 Thread vlanschot
Gerald, In case you haven't: - use Apply indicator from Formula Editor to insert it; - or from file-tree: right-click on indicator-AFL, then "insert linked" - I assume you've set your directory in Preferences->AFL->Formula tree root path. Saving lay-out, etc. should now keep all your changes fro

[amibroker] Date/Time: Now + 5 Minutes

2007-06-18 Thread sono_080
Hello, im searching for a timestop for orders via IBController. Now is 18.06.2007 11:05:00 and i need "GTD 20070618 11:10:00 GMT" Can u help me please? Thx

[amibroker] Real Time data source

2007-06-18 Thread hanan.harush
Hi I would like to create a new data source for interday RT data that is does not exists in the existing data sources ( for TASE ). looking in the documentation i understand that it is possible to have a DDE based solution which is not an alternative for me. Any suggestion how to start with ? I

[amibroker] new to amitrader

2007-06-18 Thread indianguyinny24
Hi all, i am looking for some advice and guidance to how to use this system ...which seems to have quote a respect in various places... i have been working with neural netowrk and genetic algorithm for data mining on thestock market data previously... any how to start guidance would be grt...

[amibroker] Ami broker and Excel

2007-06-18 Thread vosmerkin.evgen
I've made DDE connection to Excel. In excel sheet I have fields "Ticker" , "Last", "High", "Low" etc. In DDE plugin I've wrote DATA!{ticker}_Last DATA!{ticker}_High etc. in corresponding fields. Excel's cells were named like {ticker}_Last...etc. I've added in amibroker symbol {ticker}. Chart - Pr

[amibroker] Re: New file uploaded to amibroker

2007-06-18 Thread vlanschot
Excellent guide GP, thanks for your contribution. PS --- In amibroker@yahoogroups.com, amibroker@yahoogroups.com wrote: > > > Hello, > > This email message is a notification to let you know that > a file has been uploaded to the Files area of the amibroker > group. > > File: /AmiBrok