[amibroker] Re: Restricted Plot

2010-04-20 Thread osp2osp
Sorry, Not working. Warm Regards. K Karunakaran --- In amibroker@yahoogroups.com, "wavemechanic" wrote: > > plot( iif( barindex() >= barcount - 21, ema( array, period), null ), "", > color ); > - Original Message - > From: osp2osp > To: amibroker@yahoogroups.com > Sent: Apri

[amibroker] Re: Restricted Plot

2010-04-20 Thread osp2osp
Thank you, thank you very much. Warm Regards. K Karunakaran --- In amibroker@yahoogroups.com, "wavemechanic" wrote: > > plot( iif( barindex() >= barcount - 21, ema( array, period), null ), "", > color ); > - Original Message - > From: osp2osp > To: amibroker@yahoogroups.com >

[amibroker] AFL No-no's

2010-04-20 Thread hiscores
Thanks Tomasz. I'm still relatively new to Amibroker, short of combing through tons of backposts is there a good post/article somewhere on the rational for this? Or better yet a "common AFL mistakes" post? -hi --- In amibroker@yahoogroups.com, Tomasz Janeczko wrote: > > Hello, > > >SellPric

[amibroker] Re: price >$20<40 and average volume for the last 60 days over 200,000

2010-04-20 Thread jamesfarrow2003
Since I am a fairly novice user, I can't usually answer questions... Hopefullythis works James // To be run as an Exploration (put results in Watchlist) // For User-flashback82001 PriceTenYearsAgo = Ref(Close, -2520); // To make sure the data goes back at least ten years HistoryFilter = (Pric

[amibroker] Re: price >$20<40 and average volume for the last 60 days over 200,000

2010-04-20 Thread jamesfarrow2003
Since I am a fairly novice user, I can't usually answer questions... Hopefully this works: James // To be run as an Exploration (put results in Watchlist) // For User-flashback82001 PriceTenYearsAgo = Ref(Close, -2520); // To make sure the data goes back at least ten years HistoryFilter = (Pri

[amibroker] price >$20<40 and average volume for the last 60 days over 200,000

2010-04-20 Thread flashback82001
Any help to write a formula for the above appreciated thanks

Re: [amibroker] Re: Take profit and Stop Loss

2010-04-20 Thread Tomasz Janeczko
Hello, >SellPrice = Ref(O, 1); Wrong advice. Once again: NEVER move trading prices using ref(). Instead delays SIGNALS Buy = ref( Buy, -1 ); Sell = ref( Sell, -1 ); Best regards, Tomasz Janeczko amibroker.com On 2010-04-21 00:54, hiscores wrote: > There are numerous ways to do this, but here

[amibroker] Re: Take profit and Stop Loss

2010-04-20 Thread hiscores
There are numerous ways to do this, but here is a simple one Buy = C > MA(C, 20); BuyPrice = C; StopLoss = C < MA(C, 50); ProfitTarget = C > MA(C, 10); Sell = StopLoss OR ProfitTarget; // If we exit due to stop loss take the 50 MA otherwise // by process of elimination we exit at target 10 MA Se

[amibroker] FullName in AFL; Exploration

2010-04-20 Thread gelsner99
A simple question...I'm using the AFL code below; but it does not display the fund name when doing an Exploration; what am I doing wrong? Thanks in advance,/ Gary E. AddTextColumn(FullName(),"Fund Name",1.0);

[amibroker] Ruin Stop is activated in irrelevant trades [2 Attachments]

2010-04-20 Thread Ilhan Ketrez
Hello Ruin Stop is activated in irrelevant trades as far as I see. It happens in * some* negative price values of a continuous contract. Trade list & AFL code is attached. Data source: Premium Data Symbol: US___CCB Thanks in advance for comments, help&suggestions, Ilhan

Re: [amibroker] Restricted Plot

2010-04-20 Thread wavemechanic
plot( iif( barindex() >= barcount - 21, ema( array, period), null ), "", color ); - Original Message - From: osp2osp To: amibroker@yahoogroups.com Sent: April 20, 2010 3:39 AM Subject: [amibroker] Restricted Plot How to plot 21 days EMA only for the last 21 bars. Than

[amibroker] Take profit and Stop Loss

2010-04-20 Thread dralexchambers
Hi, How would I put together a backtest for the following. My Buy signal is: Buy = C>MA(C,20); How do I do a multiple sell signal for the following: StopLoss is hit is when C < MA(C,50) Stoploss price is MA50. TakeProfit is when C > MA(C,10), and TP price is MA10. I can only see one Sell & Se

[amibroker] Multiple buy conditions in loop???

2010-04-20 Thread christianvost
I need to write several buy conditions in a loop. Originally I had one buy condition (and BuyPrice) outside the loop, and then several exit conditions in the loop. this worked fine. Now I have added more buy conditions which I want to test, and tried many times to code this, but I get bizzarre p

[amibroker] linear regression function

2010-04-20 Thread brucet30
I am looking for some AFL code that would perform a linear regression on two arrays (x, y) and return the intercept and slope for this data set. THe only funcitons I have been able to find so far in the AFL library and elsewhere assume the x-axis is time and the y-axis is price of some other ind

[amibroker] Re: High/Low for intraday range

2010-04-20 Thread dralexchambers
Great stuff - thanks :) --- In amibroker@yahoogroups.com, reinsley wrote: > > > Hi, > > Many useless lines in this code, but you should get what you want > > Best regards > > |// HighLowDailyMap > // High and Low of the first hour > > delta = 0; > > starttime = 08; > endtime = 083000;/

[amibroker] How to backtest or plot a script, which uses SelectedValue or LastValue?

2010-04-20 Thread jhnlmn
I was exploring various trading strategies and custom indicators on the Web and saw several interesting examples in the AmiBroker library and this forum, in particular "Head & Shoulders Pattern" and "Historical Trendlines and Breakouts" at http://finance.groups.yahoo.com/group/amibroker/message/50

[amibroker] Minimum average daily range

2010-04-20 Thread gktk303
Hi all, newbie to Amibroker and AFL programming and have a quick question on how to set up an a basic exploration, I have searched but not found anything to this effect. Basically looking for an exploration for stocks that have a minimum 50c movement per day. I believe ATR gives an average over

[amibroker] how to open formula editor as tabs.

2010-04-20 Thread Prabu
Hi, Is there any possibility to open the formula editor and backtesting windows as Tabs or Seperate Task window instead of dialogs? Thanks Prabu

[amibroker] Restricted Plot

2010-04-20 Thread osp2osp
How to plot 21 days EMA only for the last 21 bars. Thank you. Warm Regards. K Karunakaran