Re: [amibroker] Help with Code for MA Cross Over - Ribbon Indictor [1 Attachment]

2010-09-08 Thread inquisitive voyager
just fixed the AFL errors.
no look into concept.

On Wed, Sep 8, 2010 at 5:02 PM, Ken H sfehe...@yahoo.com.au wrote:



   Hi

 Can anyone assist me in fixing this code?

 I am trying to create a ribbon indicator to show when a MA cross over
 occurs.

 Many thanks

 Ken

 _SECTION_BEGIN(Price);
 SetChartOptions
 (0,*chartShowArrows*|*chartShowDates*);
 _N
 (*Title* = StrFormat({{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo
 %g, Close %g (%.1f%%) {{VALUES}}, *O*, *H*, *L*, *C*, SelectedValue( ROC(
 *C*, 1 ) ) ));
 Plot
 ( *C*, Close, ParamColor(Color, *colorBlack* ), *styleNoTitle* |
 ParamStyle(Style) | GetPriceStyle() );
 _SECTION_END
 ();

 _SECTION_BEGIN
 (MA);
 P =
 ParamField(Price field,-1);
 Periods =
 Param(Periods, 15, 2, 300, 1, 10 );
 Plot
 ( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( Color, colorCycle ),
 ParamStyle(Style) );
 _SECTION_END
 ();

 _SECTION_BEGIN
 (MA1);
 P =
 ParamField(Price field,-1);
 Periods =
 Param(Periods, 50, 2, 300, 1, 10 );
 Plot
 ( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( Color, colorCycle ),
 ParamStyle(Style) );
 _SECTION_END
 ();
  Bull_Trend=(
 MA( Param(Periods, 15, 2, 300, 1, 10) ) 50);
 Bear_Trend=(
 MA( Param(Periods, 15, 2, 300, 1, 10 ) ) 50);
 Ribbon_kol=
 IIf( Bull_Trend, *colorDarkGreen*, IIf(Bear_Trend, *colorRed*,*colorRed*))

 ;
 Plot
 (5, ribbon, Ribbon_kol, *styleOwnScale*| *styleArea*|*
 styleNoLabel
 *,-
 0.5,10);

 



Re: [amibroker] Help with Code for MA Cross Over - Ribbon Indictor [1 Attachment]

2010-09-08 Thread inquisitive voyager
try this one-

On Wed, Sep 8, 2010 at 7:49 PM, inquisitive voyager 
inquisitive.voya...@gmail.com wrote:


  
 [Attachment(s)https://mail.google.com/mail/?ui=2view=jsname=main,tlistver=tMWDK4VVLkE.en.am=!HnqNg-A4riyxhZ4C2vB2xDbd5G4Oj82iIj0cEiUTOD47RHoW3qQfri#12af1b80909aeeb3_TopTextfrom
  inquisitive voyager included below]

 just fixed the AFL errors.
 no look into concept.

 On Wed, Sep 8, 2010 at 5:02 PM, Ken H sfehe...@yahoo.com.au wrote:



   Hi

 Can anyone assist me in fixing this code?

 I am trying to create a ribbon indicator to show when a MA cross over
 occurs.

 Many thanks

 Ken

 _SECTION_BEGIN(Price);
 SetChartOptions
 (0,*chartShowArrows*|*chartShowDates*);
 _N
 (*Title* = StrFormat({{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo
 %g, Close %g (%.1f%%) {{VALUES}}, *O*, *H*, *L*, *C*, SelectedValue( ROC(
 *C*, 1 ) ) ));
 Plot
 ( *C*, Close, ParamColor(Color, *colorBlack* ), *styleNoTitle* |
 ParamStyle(Style) | GetPriceStyle() );
 _SECTION_END
 ();

 _SECTION_BEGIN
 (MA);
 P =
 ParamField(Price field,-1);
 Periods =
 Param(Periods, 15, 2, 300, 1, 10 );
 Plot
 ( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( Color, colorCycle ),
 ParamStyle(Style) );
 _SECTION_END
 ();

 _SECTION_BEGIN
 (MA1);
 P =
 ParamField(Price field,-1);
 Periods =
 Param(Periods, 50, 2, 300, 1, 10 );
 Plot
 ( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( Color, colorCycle ),
 ParamStyle(Style) );
 _SECTION_END
 ();
  Bull_Trend=(
 MA( Param(Periods, 15, 2, 300, 1, 10) ) 50);
 Bear_Trend=(
 MA( Param(Periods, 15, 2, 300, 1, 10 ) ) 50);
 Ribbon_kol=
 IIf( Bull_Trend, *colorDarkGreen*, IIf(Bear_Trend, *colorRed*,*colorRed*))

 ;
 Plot
 (5, ribbon, Ribbon_kol, *styleOwnScale*| *styleArea*|*
 styleNoLabel
 *,-
 0.5,10);



  



Re: [amibroker] Formula Call Feature?

2010-09-04 Thread inquisitive voyager
what u can do is, make a function, and save it in 'Include' folder.
You can call functions from 'Include' folder in any AFL u want.

On Sat, Sep 4, 2010 at 10:55 PM, Dennis Lipter blackca...@verizon.netwrote:



 Is there a  formula call feature that references a previously written
 custom formula in a new formula?

 Say I have written Formula x and I want to include it in a new formula
 called Formula y.

 Like this simple example:

 Formula x :

   a=IIf(*C*,(*H*+*L*+*C*)/3,(*H*+*L*)/2);

   Plot
 (EMA(a,5), *Formula x**colorOrange*);


 Formula y = Formula x +2

 Thanks
 



Re: [amibroker] Data Window?

2010-09-04 Thread inquisitive voyager
Refer Tooltip feature of AB.
On Sun, Sep 5, 2010 at 1:06 AM, blackcat54 blackca...@verizon.net wrote:



 Is there some kind of data window feature that will display indicator and
 price values when you mouse over them?

 Thanks

 



Re: [amibroker] Moving Average

2010-09-01 Thread inquisitive voyager
(1)this code looks in the future.

(2)what do u mean by- The average is shifted back 9-bars?

(3)To look back 9 bars back,u should use -

x= Ref(MA(mp,18),-9);


On Wed, Sep 1, 2010 at 12:07 PM, Dennis Lipter blackca...@verizon.netwrote:



  The code below is for a centered moving average.

 The average is shifted back 9-bars.

 The problem is that for those 9-bars, a flat line is plotted. I would
 prefer to have that portion of the plot blank instead of the flat line.



 mp=IIf(*C*,(*H*+*L*+*C*)/3,(*H*+*L*)/2);

 x= Ref(MA(mp,18),9);

 Plot(x,Centered MA-18 ,*colorRed*);



 Ideas would be appreciated.

 Thanks

 



Re: [amibroker] Re: 52 week high

2010-08-31 Thread inquisitive voyager
strange!
its working fine on my end.

On Wed, Sep 1, 2010 at 3:59 AM, prasantaroy36 prasantaro...@yahoo.comwrote:





 HI VOYEGER,

 Sorry to inform you problem is same as said earlier.


 Thanks

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 inquisitive voyager inquisitive.voya...@... wrote:
 
  make sure selector line is on the last bar to get the desired result.
 
  cheers
 
  On Mon, Aug 30, 2010 at 11:43 PM, prasantaroy36 prasantaro...@...wrote:


 
  
  
  
  
   Hi,
  
   Thanks to all. Voyeger by your code i am able to see lifetime high date
 but
   i want only 52 wek high date. I have set 260 day period for 52 week
 high but
   chart shown lifetime high date. Pl, help me.
  
   Thanks
  
  
   --- In amibroker@yahoogroups.com amibroker%40yahoogroups.comamibroker%
 40yahoogroups.com,

   inquisitive voyager inquisitive.voyager@ wrote:
   
Is this u wanted?
   
On Sun, Aug 29, 2010 at 11:45 PM, prasantaroy36 prasantaroy36@
 wrote:
  
  
   


 Hi,

 i want to plot as text 52 week high date. So, what will be the afl
   logic ?

 Pl,help.

 Thanks



   
  
  
  
 

  



Re: [amibroker] coding

2010-08-31 Thread inquisitive voyager
it was not clear what  u exactly mean by biggest volume Down Day -

else

Filter=*C*1.01**O* *AND* *V*Ref(HHV(*V*,10),-1);


On Sun, Aug 29, 2010 at 7:22 PM, rpedicelli rpedice...@yahoo.com wrote:



 i need a lil help with coding. Trying to to develop an indicator that
 satisfies these conditions:

 1. today's close is greater than today's open by 1% or more
 2. today's volume is greater than the biggest volume Down Day during the
 past 10 days.

 Thanks

 RP

 



Re: [amibroker] 52 week high [1 Attachment]

2010-08-30 Thread inquisitive voyager
Is this u wanted?

On Sun, Aug 29, 2010 at 11:45 PM, prasantaroy36 prasantaro...@yahoo.comwrote:



 Hi,

 i want to plot as text 52 week high date. So, what will be the afl logic ?

 Pl,help.

 Thanks

 



Re: [amibroker] Re: 52 week high

2010-08-30 Thread inquisitive voyager
make sure selector line is on the last bar to get the desired result.

cheers

On Mon, Aug 30, 2010 at 11:43 PM, prasantaroy36 prasantaro...@yahoo.comwrote:





 Hi,

 Thanks to all. Voyeger by your code i am able to see lifetime high date but
 i want only 52 wek high date. I have set 260 day period for 52 week high but
 chart shown lifetime high date. Pl, help me.

 Thanks


 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 inquisitive voyager inquisitive.voya...@... wrote:
 
  Is this u wanted?
 
  On Sun, Aug 29, 2010 at 11:45 PM, prasantaroy36 prasantaro...@...wrote:


 
  
  
   Hi,
  
   i want to plot as text 52 week high date. So, what will be the afl
 logic ?
  
   Pl,help.
  
   Thanks
  
  
  
 

  



Re: [amibroker] Req Exploration code for finding stocks with price crossed today above 20ema and

2010-08-20 Thread inquisitive voyager
(1)In case u dont use EOD data,use the following code-




(1)AA-setting-periodicity-daily

(2)AA-range-n last days-

set n=1

On Fri, Aug 20, 2010 at 9:59 PM, ford7k for...@yahoo.com wrote:



 Hi experts

 I run my update of eod and try to locate only those stocks that made a
 price cross above 13Ema and MACD crossed SIGNAL.
 When I tried, I AM GETTING ALL OLD THINGS,(THAT MADE CROSSOVER MANY DAYS
 AGO) MAKING IT DIFFICULT TO LOCATE ONLY THOSE THAT satisfied both criteria
 JUST TODAY.

 How to fix this exploration requirement,please guide me with needed code
 lines

 I tried

 Buy = C  EMA(C,13) AND MACD  SIGNAL;
 SELL = C EMA(C,13) AND MACD  SIGNAL;
 Filter = Buy or Sell;

 Thanks for help
 regards
 ford

 



Re: [amibroker] Re: Help request : Plot vertical line [1 Attachment]

2010-08-12 Thread inquisitive voyager
try this.

change the date.
make sure it's not a trade holiday.

On Thu, Aug 12, 2010 at 11:33 AM, pacific5_au pacific5...@yahoo.com wrote:



 Ara, That is one of the variations I've tried, but it doesn't work. For me
 at least.

 Thanks anyway.

 Any other suggestions ??


 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com, Ara
 Kaloustian ara1.kaloust...@... wrote:
 
  D1 = DateNum() == 1061001; // 2006-10-01
  Plot( D1, , colorWhite, stylearea | styleOwnScale |
  styleNoLabel, 0,1);
 
  On 08/11/2010 8:58 PM, pacific5_au wrote:
  
  
  
   I am trying to Plot a vertical line on a date or dates I nominate.
  
   Have looked back through this list but cannot find what I want.
  
   This is what I've tried -
  
   D1 = DateNum() == 1061001; // 2006-10-01
   Plot( D1, , colorWhite, styleHistogram | styleOwnScale |
   styleNoLabel );
  
   Can someone please point me in the right direction on this.
  
   Thank you.
  
   Pacific
  
  
 

  



Re: [amibroker] Assigning value to variable based on year

2010-08-09 Thread Inquisitive Voyager
replace assignment operator = with equality == operator.

*if* (YearCal == 2000) StochDays = 21;

On Mon, Aug 9, 2010 at 7:14 AM, TA tagro...@sbcglobal.net wrote:



  I want to assign different values to a variable based on the year for
 plotting and back testing. The following is an example, where I want to
 assign different value to the lookback period to calculate stochastics.



 YearCal = Year();
 *if* (YearCal = 2000) StochDays = 21;
 *if* (YearCal = 2001) StochDays = 38;
 *if* (YearCal = 2002) StochDays = 45;
 *if* (YearCal = 2003) StochDays = 31;
 *if* (YearCal = 2004) StochDays = 11;
 *if* (YearCal = 2005) StochDays = 34;
 *if* (YearCal = 2006) StochDays = 50;
 *if* (YearCal = 2007) StochDays = 43;
 *if* (YearCal = 2008) StochDays = 26;
 *if* (YearCal = 2009) StochDays = 17;



 Stochastics  =  StochK(StochDays,1);



 Buy = Stochastics = 15;



 My attempt above doesn’t work. Any suggestions? TIA

 



Re: [amibroker] req code afl for condition stochastics goes below 20 and comes above 20 [1 Attachment]

2010-08-08 Thread Inquisitive Voyager
as far as buy signals are concerned , check the attached AFL.

wanted to accomodate sell condition too(altogether different code using
flip),but sell arrows were not properly appearing.




On Fri, Aug 6, 2010 at 11:26 PM, rvlv r...@yahoo.com wrote:



 Hi Inquisitive voyager and afl expert reinsley

 Can you please provide code lines for this condition

 1 stochastics goes below 20 and comes back above 20 (down and up hook)
 2. stochastics goes above 80 and goes below 80 (up and down hook)

 I tried
 buy = stochk(15,3) 20 and stochk(15,3) 20 ;
 sell = stochk(15,3) 80 and stochk(15,3) 80 ;

 But the code is not working.
 one observation is the down cross occurs at one time and then after a long
 time delay,up cross occurs.
 similarly for up and dn hook,time delay is quite some value between up and
 dn cross locations

 If an arrow is coded , how the code looks like?

 thanks in advance
 rv

 



Re: [amibroker] Multiple Higher Highs in Amibroker? [1 Attachment]

2010-08-06 Thread Inquisitive Voyager
(1) find the attachment
(2) this code works in commentary window only.
(3)copy paste the code.dont overlay.

On Thu, Aug 5, 2010 at 7:29 PM, n7wyw dennisljohns...@hotmail.com wrote:



 I want to find out the three highest highs for the past 100 periods.
 Highest give only the top value, how can I get the next highest value and
 the next?

 Thanks,

 Dennis

 



Re: [amibroker] Multiple Higher Highs in Amibroker?

2010-08-06 Thread Inquisitive Voyager
(1) http://finance.groups.yahoo.com/group/amibroker/message/151819


or

(2)if u access the group through your email,search the group's mail on my
behalf and download the attached AFL.
u can load the same in CW.




On Sat, Aug 7, 2010 at 1:28 AM, Lionel Issen lis...@sbcglobal.net wrote:



  There was no attachment.

 Please send me the correct website address for this missing attachment.



 *From:* amibroker@yahoogroups.com [mailto:amibro...@yahoogroups.com] *On
 Behalf Of *Inquisitive Voyager
 *Sent:* Friday, August 06, 2010 9:54 AM
 *To:* amibroker@yahoogroups.com
 *Subject:* Re: [amibroker] Multiple Higher Highs in Amibroker? [1
 Attachment]





 *[Attachment(s)https://mail.google.com/mail/html/compose/static_files/blank_quirks.html#12a48fb899a14992_TopTextfrom
  Inquisitive Voyager included below]
 *

 (1) find the attachment

 (2) this code works in commentary window only.

 (3)copy paste the code.dont overlay.

 On Thu, Aug 5, 2010 at 7:29 PM, n7wyw dennisljohns...@hotmail.com wrote:



 I want to find out the three highest highs for the past 100 periods.
 Highest give only the top value, how can I get the next highest value and
 the next?

 Thanks,

 Dennis



  



Re: [amibroker] Percentage calculation Amibroker [1 Attachment]

2010-08-04 Thread Inquisitive Voyager
find the attachment.




On Tue, Aug 3, 2010 at 7:34 AM, afzal hossain cube_...@yahoo.com wrote:



   Hello All


 Can anybody tell me how can i see in the amibroker % (percentage) change in
 price and volume for last 3 days, last 7 days , last 15 days, last 21days
 and last 3 month. % can be positive or negative. Can anybody help me to give
 such afl?

 Thanks and Regards
 Afzal

  



Re: [amibroker] Re: paramDate [1 Attachment]

2010-08-02 Thread Inquisitive Voyager
this one calculates % change of c (eod change) within a range.

set the range either with mouse or F12 and shift+F12.

cheers

On Sun, Aug 1, 2010 at 9:45 PM, prasantaroy36 prasantaro...@yahoo.comwrote:





 Hi Voyager,

 Thanks for your continue contribution. Anyway, i want same calculation
 between selected 2 date ( between 2 backdates) by clicking mouse . So, pl,
 help.

 Thanks

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  check this out-
 
  ps: this shall work in all TF's.
 
  On Mon, Jul 26, 2010 at 8:18 PM, Inquisitive Voyager hedonist2...@...
   wrote:
 
   set the timeframe as Daily while using the same.
  
   On Sat, Jul 24, 2010 at 3:28 PM, mikk12345 mikk12...@... wrote:
  
  
  
   Thanks, But i want the exact day count not barcount.
  
  
   --- In amibroker@yahoogroups.com amibroker%40yahoogroups.comamibroker%
 40yahoogroups.com,
   Inquisitive Voyager hedonist2008@ wrote:
   
check this out.
   
On Sat, Jul 24, 2010 at 11:14 AM, prasantaroy36 prasantaroy36@
   ...wrote:
   



 Hi,

 This logic works well . Also can you give another logic for
 closing
   price
 change between last date  selected date? waiting for your
 valuable
   reply.

 Thanks

 --- In amibroker@yahoogroups.com 
 amibroker%40yahoogroups.comamibroker%
 40yahoogroups.comamibroker%
   40yahoogroups.com,
 Inquisitive Voyager hedonist2008@ wrote:
 
  Go thru the enclosed AFL.
  is that what u sought?
 
 
 
 
 
  On Fri, Jul 23, 2010 at 4:43 PM, mikk12345 mikk12345@ wrote:
 
  
  
   I would like to calculate the days between the selected date
 and
   today;
  
   My code is:-
  
   FutureDate=ParamDate( Select Date in Future, Now());
  
   Today=Now();
  
   Daycount=FutureDate-Today;
  
   Seems to throw up an error. Any suggestions. Thanks,
  
   Mikey.
  
  
  
 



   
  
  
  
  
  
 

 



Re: [amibroker] additionnal centered underscore PlotShape [1 Attachment]

2010-08-01 Thread Inquisitive Voyager
see it it helps!

find the attachment

On Sun, Aug 1, 2010 at 8:17 AM, ram vel r...@yahoo.com wrote:



   Hi reinsley
 On an intraday chart 15min tf, can we plot previous days close?
 can your code line be modified to show
 previous days close, and todays latest close as lines on chart,please
 thanks
 rv

 --- On *Fri, 7/30/10, reinsley reins...@yahoo.fr* wrote:


 From: reinsley reins...@yahoo.fr
 Subject: Re: [amibroker] additionnal centered underscore PlotShape
 To: amibroker@yahoogroups.com
 Date: Friday, July 30, 2010, 9:34 AM




 Stupid question...the simple way.

 Plot( LastValue( *C* ), , colorWhite , *styleLine* , *Null*, *Null*, *
 Null*, 2 );

 Shame on me !

 Le 29/07/2010 11:19, Reinsley a écrit :




 Hi,

 I plot an horizontal line on the close that way.

 PlotShapes( shapeHollowSmallCir cle, colorWhite , layer = 0, yposition =
 LastValue(C) , offset = 0 );


 Does it exist some hidden shapes not documented ?

 Or personnal additionnal shapes such as :

 tiret, centered underscore, left triangle, right triangle...

 In the above example, a centered underscore (centered in Y axis) could draw
 what I wish , a plain line.

 Or a trick to display the line...

 TIA

 Best regards



  



Re: [amibroker] ATR Based Entry and Exit [1 Attachment]

2010-07-29 Thread Inquisitive Voyager
find the attachment.

On Thu, Jul 29, 2010 at 12:51 PM, mr.viir vii...@ymail.com wrote:



 Hi

 I am looking for an ATR based formula which shows :
 1) Entry Signal when price closes more than an ATR above the most recent
 close
 and
 2) Exit Signal when price closes more than one ATR below the most recent
 close.

 Can anyone please help me in coding the above condition?

 Thanks
 



Re: [amibroker] Req help coding problems bars since crossover and exploration-same stock [1 Attachment]

2010-07-28 Thread Inquisitive Voyager
(1) try the attachment.

(2) for second problem: adjust range parameters in AA .
On Tue, Jul 27, 2010 at 9:44 PM, ford7k for...@yahoo.com wrote:




 Hi Afl experts

 Please help with minor problem -coding lines needed

 First thing

 In the exploration I like to get buy=upcrossover(say 50M over 200MA)
 SELL = 50MA BELOW 200MA
 So far no prob
 I want to know in the exploration,that
 how many bars passed since latest,most recent crossover for buy and for
 crossover sell.

 I tried barssince but nothing happening.
 Can somebody guide me please-may be doing something wrong.

 Second problem

 I run an exploration in intraday or daily.
 I get same stock appearing manytimes. How to get one stock appear only
 onetime?
 May be there are signals for buy or sell for just ten stocks but if each
 stock appears over 7 times or 10 times,I feel it as a problem.

 thanks in advance
 regards
 ford

 



Re: [amibroker] plottext

2010-07-28 Thread Inquisitive Voyager
what is that condition?

On Thu, Jul 29, 2010 at 7:46 AM, Anthony Faragasso ajf1...@epix.net wrote:



 I would like to stick a date on the chart tied to a specific condition and
 not
 have the date change when moving through the chart...any help appreciated.

 Thank you
 Anthony

 



Re: [amibroker] Re: paramDate

2010-07-26 Thread Inquisitive Voyager
set the timeframe as Daily while using the same.

On Sat, Jul 24, 2010 at 3:28 PM, mikk12345 mikk12...@yahoo.com wrote:



 Thanks, But i want the exact day count not barcount.

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  check this out.
 
  On Sat, Jul 24, 2010 at 11:14 AM, prasantaroy36 prasantaroy36@
 ...wrote:
 
  
  
  
   Hi,
  
   This logic works well . Also can you give another logic for closing
 price
   change between last date  selected date? waiting for your valuable
 reply.
  
   Thanks
  
   --- In amibroker@yahoogroups.com amibroker%40yahoogroups.comamibroker%
 40yahoogroups.com,
   Inquisitive Voyager hedonist2008@ wrote:
   
Go thru the enclosed AFL.
is that what u sought?
   
   
   
   
   
On Fri, Jul 23, 2010 at 4:43 PM, mikk12345 mikk12345@ wrote:
   


 I would like to calculate the days between the selected date and
 today;

 My code is:-

 FutureDate=ParamDate( Select Date in Future, Now());

 Today=Now();

 Daycount=FutureDate-Today;

 Seems to throw up an error. Any suggestions. Thanks,

 Mikey.



   
  
  
  
 

 



Re: [amibroker] Re: paramDate [1 Attachment]

2010-07-26 Thread Inquisitive Voyager
check this out-

ps: this shall work in all TF's.

On Mon, Jul 26, 2010 at 8:18 PM, Inquisitive Voyager hedonist2...@gmail.com
 wrote:

 set the timeframe as Daily while using the same.

 On Sat, Jul 24, 2010 at 3:28 PM, mikk12345 mikk12...@yahoo.com wrote:



 Thanks, But i want the exact day count not barcount.


 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  check this out.
 
  On Sat, Jul 24, 2010 at 11:14 AM, prasantaroy36 prasantaroy36@
 ...wrote:
 
  
  
  
   Hi,
  
   This logic works well . Also can you give another logic for closing
 price
   change between last date  selected date? waiting for your valuable
 reply.
  
   Thanks
  
   --- In amibroker@yahoogroups.com amibroker%40yahoogroups.comamibroker%
 40yahoogroups.com,
   Inquisitive Voyager hedonist2008@ wrote:
   
Go thru the enclosed AFL.
is that what u sought?
   
   
   
   
   
On Fri, Jul 23, 2010 at 4:43 PM, mikk12345 mikk12345@ wrote:
   


 I would like to calculate the days between the selected date and
 today;

 My code is:-

 FutureDate=ParamDate( Select Date in Future, Now());

 Today=Now();

 Daycount=FutureDate-Today;

 Seems to throw up an error. Any suggestions. Thanks,

 Mikey.



   
  
  
  
 

  





Re: [amibroker] Shortcut keys

2010-07-25 Thread Inquisitive Voyager
try using combinations including modifier keys-

instead of b use ctrl+shift+ b as short cut.

On Sun, Jul 25, 2010 at 11:41 AM, Vishvesh vishvesh.chau...@gmail.comwrote:



 Hello Group,

 I have customized entire keyboard for different-different command. Now the
 problem occurs when i try to put text on chart (Elliott marking). For
 example i have used b for bar chart, and now when try to type b, it
 doesn't type b but it executes the command. Can anyone of you give an idea
 how can i have both working at same time. Or while i type the command does
 not execute. It sounds little weird but that is what my requirement is.

 Thanks  Regards
 Vishvesh
 



Re: [amibroker] Re: paramDate [1 Attachment]

2010-07-24 Thread Inquisitive Voyager
check this out.

On Sat, Jul 24, 2010 at 11:14 AM, prasantaroy36 prasantaro...@yahoo.comwrote:




 Hi,

 This logic works well . Also can you give another logic for closing price
 change between last date  selected date? waiting for your valuable reply.

 Thanks

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  Go thru the enclosed AFL.
  is that what u sought?
 
 
 
 
 
  On Fri, Jul 23, 2010 at 4:43 PM, mikk12345 mikk12...@... wrote:
 
  
  
   I would like to calculate the days between the selected date and today;
  
   My code is:-
  
   FutureDate=ParamDate( Select Date in Future, Now());
  
   Today=Now();
  
   Daycount=FutureDate-Today;
  
   Seems to throw up an error. Any suggestions. Thanks,
  
   Mikey.
  
  
  
 

 



Re: [amibroker] Re: paramDate [1 Attachment]

2010-07-24 Thread Inquisitive Voyager
find the attachment.

On Sat, Jul 24, 2010 at 7:54 PM, prasantaroy36 prasantaro...@yahoo.comwrote:



 Hi,

 Thanks for your quick responce. Your previous afl plot text on left side
 .Is it possible to plot it always top of the right side corner? If yes ,
 sorry to bore you again. Pl, reply.

 Note--- Your previos afl.

 Thanks

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  check this out.
 
  On Sat, Jul 24, 2010 at 11:14 AM, prasantaroy36 prasantaroy36@
 ...wrote:
 
  
  
  
   Hi,
  
   This logic works well . Also can you give another logic for closing
 price
   change between last date  selected date? waiting for your valuable
 reply.
  
   Thanks
  
   --- In amibroker@yahoogroups.com amibroker%40yahoogroups.comamibroker%
 40yahoogroups.com,
   Inquisitive Voyager hedonist2008@ wrote:
   
Go thru the enclosed AFL.
is that what u sought?
   
   
   
   
   
On Fri, Jul 23, 2010 at 4:43 PM, mikk12345 mikk12345@ wrote:
   


 I would like to calculate the days between the selected date and
 today;

 My code is:-

 FutureDate=ParamDate( Select Date in Future, Now());

 Today=Now();

 Daycount=FutureDate-Today;

 Seems to throw up an error. Any suggestions. Thanks,

 Mikey.



   
  
  
  
 

 



Re: [amibroker] paramDate [1 Attachment]

2010-07-23 Thread Inquisitive Voyager
Go thru the enclosed AFL.
is that what u sought?





On Fri, Jul 23, 2010 at 4:43 PM, mikk12345 mikk12...@yahoo.com wrote:



 I would like to calculate the days between the selected date and today;

 My code is:-

 FutureDate=ParamDate( Select Date in Future, Now());

 Today=Now();

 Daycount=FutureDate-Today;

 Seems to throw up an error. Any suggestions. Thanks,

 Mikey.

 



Re: [amibroker] LLV and dynamic period

2010-07-23 Thread Inquisitive Voyager
a=LastValue(ATR(14));

myvalue=LLV(MA(*C*,10),a);


On Wed, Jul 21, 2010 at 12:16 AM, them1060 yeohwas...@yahoo.com wrote:



 Can I use a dynamic period in LLV?

 Ie myvalue = LLV(MA(C, 10), ATR(14))

 so that periods will be dynamic as the atr moves?

 Thanks!

 



Re: [amibroker] Req Help me get afl code line for % change in price

2010-07-14 Thread Inquisitive Voyager
AddColumn((Ref(*C*,-1)-*C*)*100/Ref(*C*,-1),% change close);


On Wed, Jul 14, 2010 at 1:46 PM, ford7k for...@yahoo.com wrote:



 Hi afl experts

 I run my scan or exploration.
 I get c,close price.
 I cant get % change
 % change = previous close price -current close price

 in a daily change i need previous days close price - current close
 as % change

 Help me by giving right code line for % change in intraday and in eod
 situation

 advance thanks
 regards
 ford

 



Re: [amibroker] Req Help me get afl code line for % change in price

2010-07-14 Thread Inquisitive Voyager
it was just a suggestion not a complete code.
any way,add

Filter=1;
and use explore-


i.e.

Filter=1;

AddColumn((Ref(*C*,-1)-*C*)*100/Ref(*C*,-1),% change close);



On Wed, Jul 14, 2010 at 5:50 PM, ram vel r...@yahoo.com wrote:



   hi Inquisitive Voyager

 I tried your code.
 some reason,it does not work
 please verify
 thanks


 --- On *Wed, 7/14/10, Inquisitive Voyager hedonist2...@gmail.com* wrote:


 From: Inquisitive Voyager hedonist2...@gmail.com
 Subject: Re: [amibroker] Req Help me get afl code line for % change in
 price
 To: amibroker@yahoogroups.com
 Date: Wednesday, July 14, 2010, 4:01 AM


  AddColumn((Ref(*C*,-1)-*C*)*100/Ref(*C*,-1),% change close);


 On Wed, Jul 14, 2010 at 1:46 PM, ford7k for...@yahoo. 
 comhttp://us.mc342.mail.yahoo.com/mc/compose?to=for...@yahoo.com
  wrote:


  Hi afl experts

 I run my scan or exploration.
 I get c,close price.
 I cant get % change
 % change = previous close price -current close price

 in a daily change i need previous days close price - current close
 as % change

 Help me by giving right code line for % change in intraday and in eod
 situation

 advance thanks
 regards
 ford



  



Re: [amibroker] plot multiple lines [1 Attachment]

2010-07-10 Thread Inquisitive Voyager
enter the lookback month's in the parameter and the AFL plots a single
horizontal line.

cheers
On Fri, Jul 9, 2010 at 3:17 PM, mrugenmetha MEHTA mdkme...@yahoo.comwrote:



   hi,

 how can i plot multiple horizontal like 3months high,1year high,2years
 high..help needed

 thx in advance

 --- On *Fri, 7/9/10, Tomasz Janeczko gro...@amibroker.com* wrote:


 From: Tomasz Janeczko gro...@amibroker.com
 Subject: Re: [amibroker] Broker.layers file corrupted
 To: amibroker@yahoogroups.com
 Date: Friday, July 9, 2010, 2:43 PM


 Hello,

 Simply delete broker.layer file. It will be recreated automatically.

 Best regards,
 Tomasz Janeczko
 amibroker.com

 On 2010-07-09 06:12, Deepak Patade wrote:

  i am getting the mesaage , broker.layer file corrupted , amibroker will
 not be loaded

 Please help urgently
 Deepak Patade


  



Re: [amibroker] making ticker=current ticker

2010-07-06 Thread Inquisitive Voyager
_xyz=Foreign(xyz,C,1);
Plot(_xyz,xyz,*colorGreen*,*styleLine*);

overlay the above code on ABC price chart.
u shall get both ticker in the same pane.


On Tue, Jul 6, 2010 at 10:33 PM, jim fenster normanj...@yahoo.com wrote:



 Hi,

 I am trying to run a pairs trading system that starts with:

 ticker1=ABC;
 ticker2=XYZ;


 What im wondering is, what if I want to use the current ticker and say ABC.
 So ticker 1 is the current symbol and ticker two is ABC.
 How do I write that code? If I put the ticker2 as the current stock, it
 doesnt work. Because when the current stock is ABC, then the system doesnt
 know what the other ticker was..Anyone run into this problem?


 Thanks,

 Jim

  



Re: [amibroker] Add labels without study!

2010-07-01 Thread Inquisitive Voyager
_SECTION_BEGIN(Price);

SetChartOptions(0,*chartShowArrows*|*chartShowDates*);

_N(*Title* = StrFormat({{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo
%g, Close %g (%.1f%%) {{VALUES}}, *O*, *H*, *L*, *C*, SelectedValue( ROC( *
C*, 1 ) ) ));

Plot( *C*, Close, ParamColor(Color, *colorBlack* ), *styleNoTitle* |
ParamStyle(Style) | GetPriceStyle() );
*

Title*+=\n5 period HIGH EMA=+EMA(*High*,5)+ 5 period LOW EMA=+EMA(*Low*,
5);

_SECTION_END();


On Thu, Jul 1, 2010 at 11:52 AM, infynhome infynh...@yahoo.com wrote:



 Hello members,

 How do we add only the label / value of a particular indicator / average in
 the price pane of the chart... but do not wish to plot the study???

 What I want is... to add 5 period EMA of Highs and Lows on the price
 chart... but only need its values as a label and want to avoid plotting the
 ema's on the chart.

 Please help.

 Regards
 Infinity

 



Re: [amibroker] Investigation Individual months

2010-06-21 Thread Inquisitive Voyager
try this in commentary-


a=LastValue(Month())-2;

b=Month()!=Ref(Month(),-1);

bi=BarIndex();

d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));

d=*BarCount*-d;

e=LastValue(HHV(*C*,d));

WriteVal(e);

On Mon, Jun 21, 2010 at 4:49 AM, Steve_Almond m...@steveal.gotadsl.co.ukwrote:



 I want to find the highest closing price for a stock in the last month and
 the one before that (say highest for May and for April).
 I thought I could use something like:

 HHV(C,Ref(Month(),-1))

 but it seems only to return a recent high value.

 Can someone point me in the right direction?

 Thanks,

 Steve

 



Re: [amibroker] Investigation Individual months

2010-06-21 Thread Inquisitive Voyager
or overlay this on price chart-


a=LastValue(Month())-2;

b=Month()!=Ref(Month(),-1);

bi=BarIndex();

d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));

e=*BarCount*-d;

f=LastValue(HHV(*H*,e));

PlotText(2 month high+f,d,f,*colorRed*);


On Mon, Jun 21, 2010 at 12:08 PM, Inquisitive Voyager 
hedonist2...@gmail.com wrote:


 try this in commentary-


 a=LastValue(Month())-2;

 b=Month()!=Ref(Month(),-1);

 bi=BarIndex();

 d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));

 d=*BarCount*-d;

 e=LastValue(HHV(*C*,d));

 WriteVal(e);
   On Mon, Jun 21, 2010 at 4:49 AM, Steve_Almond 
 m...@steveal.gotadsl.co.ukwrote:



 I want to find the highest closing price for a stock in the last month and
 the one before that (say highest for May and for April).
 I thought I could use something like:

 HHV(C,Ref(Month(),-1))

 but it seems only to return a recent high value.

 Can someone point me in the right direction?

 Thanks,

 Steve

 





Re: [amibroker] Re: Investigation Individual months

2010-06-21 Thread Inquisitive Voyager
(1)use this-


_SECTION_BEGIN(Price);

SetChartOptions(0,*chartShowArrows*|*chartShowDates*);

_N(*Title* = StrFormat({{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo
%g, Close %g (%.1f%%) {{VALUES}}, *O*, *H*, *L*, *C*, SelectedValue( ROC( *
C*, 1 ) ) ));

Plot( *C*, Close, ParamColor(Color, *colorBlack* ), *styleNoTitle* |
ParamStyle(Style) | GetPriceStyle() );

_SECTION_END();

_SECTION_BEGIN(steve);

a=LastValue(Month())-1;

b=LastValue(Month())-2;

b=Month()!=Ref(Month(),-1);

bi=BarIndex();

d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));

e=*BarCount*-d;

f=LastValue(ValueWhen(Month()==b *AND* b,bi,1));

g=*BarCount*-f;

i=LastValue(HHV(*H*,e)) ; j= LastValue(HHV(*H*,g));
*

Filter*=i *OR* j;

AddColumn(*C*,close,1.2);

AddColumn(i,1 month high,1.1);

AddColumn(j,2 month high,1.1);

_SECTION_END();

(2) select range as -n last days

and write n=1

(3)if Intraday data then use timeframe - daily


On Mon, Jun 21, 2010 at 5:58 PM, Steve_Almond m...@steveal.gotadsl.co.ukwrote:



 Voyager,

 Thanks for the answers.
 I'm afraid I didn't explain myself properly. I wasn't looking for the 2
 month high, I was looking for the monthly high for each of the past two
 months!

 In other words, I want to do an exploration for a stock and find its
 highest value in June, its highest value in May etc.

 Can you help with this, apparently easier, problem?

 Steve

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  or overlay this on price chart-
 
 
  a=LastValue(Month())-2;
 
  b=Month()!=Ref(Month(),-1);
 
  bi=BarIndex();
 
  d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));
 
  e=*BarCount*-d;
 
  f=LastValue(HHV(*H*,e));
 
  PlotText(2 month high+f,d,f,*colorRed*);
 
 
  On Mon, Jun 21, 2010 at 12:08 PM, Inquisitive Voyager 
  hedonist2...@... wrote:
 
  
   try this in commentary-
  
  
   a=LastValue(Month())-2;
  
   b=Month()!=Ref(Month(),-1);
  
   bi=BarIndex();
  
   d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));
  
   d=*BarCount*-d;
  
   e=LastValue(HHV(*C*,d));
  
   WriteVal(e);
   On Mon, Jun 21, 2010 at 4:49 AM, Steve_Almond m...@...wrote:
  
  
  
   I want to find the highest closing price for a stock in the last month
 and
   the one before that (say highest for May and for April).
   I thought I could use something like:
  
   HHV(C,Ref(Month(),-1))
  
   but it seems only to return a recent high value.
  
   Can someone point me in the right direction?
  
   Thanks,
  
   Steve
  
  
  
  
  
 

 



Re: [amibroker] Re: Investigation Individual months

2010-06-21 Thread Inquisitive Voyager
OOPS!

same variable name was used in 2 premises-

use this code rest same-


a=LastValue(Month())-1;

z=LastValue(Month())-2;

 b=Month()!=Ref(Month(),-1);

bi=BarIndex();

d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));

e=*BarCount*-d;

f=LastValue(ValueWhen(Month()==z *AND* b,bi,1));

g=*BarCount*-f;

i=LastValue(HHV(*H*,e)) ; j= LastValue(HHV(*H*,g));
*

Filter*=i *OR* j;

AddColumn(*C*,close,1.2);

AddColumn(i,1 month high,1.1);

AddColumn(j,2 month high,1.1);


On Mon, Jun 21, 2010 at 10:03 PM, Inquisitive Voyager 
hedonist2...@gmail.com wrote:

 (1)use this-


 _SECTION_BEGIN(Price);

 SetChartOptions
 (0,*chartShowArrows*|*chartShowDates*);

 _N
 (*Title* = StrFormat({{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo
 %g, Close %g (%.1f%%) {{VALUES}}, *O*, *H*, *L*, *C*, SelectedValue( ROC(
 *C*, 1 ) ) ));

 Plot
 ( *C*, Close, ParamColor(Color, *colorBlack* ), *styleNoTitle* |
 ParamStyle(Style) | GetPriceStyle() );

 _SECTION_END
 ();

 _SECTION_BEGIN
 (steve);

 a=
 LastValue(Month())-1;

 b=
 LastValue(Month())-2;

 b=
 Month()!=Ref(Month(),-1);

 bi=
 BarIndex();

 d=
 LastValue(ValueWhen(Month()==a *AND* b,bi,1));

 e=*BarCount*-d;

 f=
 LastValue(ValueWhen(Month()==b *AND* b,bi,1));

 g=*BarCount*-f;

 i=
 LastValue(HHV(*H*,e)) ; j= LastValue(HHV(*H*,g));*

 Filter
 *=i *OR* j;

 AddColumn
 (*C*,close,1.2);

 AddColumn
 (i,1 month high,1.1);

 AddColumn
 (j,2 month high,1.1);

 _SECTION_END
 ();

 (2) select range as -n last days

 and write n=1

 (3)if Intraday data then use timeframe - daily


   On Mon, Jun 21, 2010 at 5:58 PM, Steve_Almond 
 m...@steveal.gotadsl.co.ukwrote:



 Voyager,

 Thanks for the answers.
 I'm afraid I didn't explain myself properly. I wasn't looking for the 2
 month high, I was looking for the monthly high for each of the past two
 months!

 In other words, I want to do an exploration for a stock and find its
 highest value in June, its highest value in May etc.

 Can you help with this, apparently easier, problem?

 Steve

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  or overlay this on price chart-
 
 
  a=LastValue(Month())-2;
 
  b=Month()!=Ref(Month(),-1);
 
  bi=BarIndex();
 
  d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));
 
  e=*BarCount*-d;
 
  f=LastValue(HHV(*H*,e));
 
  PlotText(2 month high+f,d,f,*colorRed*);
 
 
  On Mon, Jun 21, 2010 at 12:08 PM, Inquisitive Voyager 
  hedonist2...@... wrote:
 
  
   try this in commentary-
  
  
   a=LastValue(Month())-2;
  
   b=Month()!=Ref(Month(),-1);
  
   bi=BarIndex();
  
   d=LastValue(ValueWhen(Month()==a *AND* b,bi,1));
  
   d=*BarCount*-d;
  
   e=LastValue(HHV(*C*,d));
  
   WriteVal(e);
   On Mon, Jun 21, 2010 at 4:49 AM, Steve_Almond m...@...wrote:
  
  
  
   I want to find the highest closing price for a stock in the last
 month and
   the one before that (say highest for May and for April).
   I thought I could use something like:
  
   HHV(C,Ref(Month(),-1))
  
   but it seems only to return a recent high value.
  
   Can someone point me in the right direction?
  
   Thanks,
  
   Steve
  
  
  
  
  
 

 





Re: [amibroker] How to sell at +5 or -5

2010-06-11 Thread Inquisitive Voyager
Sell=(*Buy*+5) *OR* (*Buy*-5);
ps: it is better touse % than points.

On Fri, Jun 11, 2010 at 11:58 AM, Prabu prabui...@gmail.com wrote:



 Hi,

 I'm new to amibroker.
 Please help me with this..

 I'm testing it with a simple Ema crossover system. It buy on ema-crossover
 and Sell if price goes above or below 5 points from the buy price.

 I'm able to write the Buy condition. But i'm not able to write the sell
 condition. I'm confused whether I can write it as Sell condition or should i
 write it with ApplyStop's .. please help me.

 e1 = EMA(C, 14);
 e2 = EMA(C, 5);

 Buy = Cross(e2, e1);
 Sell = (.. confused here .. )

 Thanks
 Prabu

 



Re: [amibroker] How to sell at +5 or -5

2010-06-11 Thread Inquisitive Voyager
(1) as 5 is small factor. This happens-
replace it with-
Sell = (Buy*1.1) OR (Buy*.9);


this sells when price is 10 % above or 10% bellow the buy.

 btw: are  u trying it on eod data?


On Fri, Jun 11, 2010 at 12:55 PM, Prabu prabui...@gmail.com wrote:



 hi,

 I tried this..

 e1 = EMA(C, 14);
 e2 = EMA(C, 5);

 Buy = Cross(e2, e1);


 But it is buying and selling on the same bar..


 Prabu


 On Fri, Jun 11, 2010 at 12:36 PM, Inquisitive Voyager 
 hedonist2...@gmail.com wrote:



 Sell=(
 *Buy*+5) *OR* (*Buy*-5);ps: it is better touse % than points.


 On Fri, Jun 11, 2010 at 11:58 AM, Prabu prabui...@gmail.com wrote:



 Hi,

 I'm new to amibroker.
 Please help me with this..

 I'm testing it with a simple Ema crossover system. It buy on
 ema-crossover and Sell if price goes above or below 5 points from the buy
 price.

 I'm able to write the Buy condition. But i'm not able to write the sell
 condition. I'm confused whether I can write it as Sell condition or should i
 write it with ApplyStop's .. please help me.

 e1 = EMA(C, 14);
 e2 = EMA(C, 5);

 Buy = Cross(e2, e1);
 Sell = (.. confused here .. )

 Thanks
 Prabu



  



Re: [amibroker] How to sell at +5 or -5

2010-06-11 Thread Inquisitive Voyager
@prabhu: try this.


e1 = MA(*C*, 14);

e2 = MA(*C*, 5);

*Buy* = Cross(e2, e1);

pb= ValueWhen(Cross(e2, e1),*C*);
*

Sell*=IIf(*C*pb+5,*True*,IIf(*C*pb-5,*True*,*False*));



@mike: without IIF sell condition shall always be true.

BTW,thanks for your input.



On Fri, Jun 11, 2010 at 1:28 PM, Prabu prabui...@gmail.com wrote:



 Still the result is same. (selling on the same bar).
 I'm trying it with 5 Minute periodicity.

 I even tried Sell = (Buy+30) OR (Buy-30); no use;


 On Fri, Jun 11, 2010 at 1:11 PM, Inquisitive Voyager 
 hedonist2...@gmail.com wrote:



 (1) as 5 is small factor. This happens-
 replace it with-
 Sell = (Buy*1.1) OR (Buy*.9);


 this sells when price is 10 % above or 10% bellow the buy.

  btw: are  u trying it on eod data?


  On Fri, Jun 11, 2010 at 12:55 PM, Prabu prabui...@gmail.com wrote:



  hi,

 I tried this..

 e1 = EMA(C, 14);
 e2 = EMA(C, 5);

 Buy = Cross(e2, e1);


  But it is buying and selling on the same bar..


 Prabu


 On Fri, Jun 11, 2010 at 12:36 PM, Inquisitive Voyager 
 hedonist2...@gmail.com wrote:



 Sell=(
 *Buy*+5) *OR* (*Buy*-5);ps: it is better touse % than points.


 On Fri, Jun 11, 2010 at 11:58 AM, Prabu prabui...@gmail.com wrote:



 Hi,

 I'm new to amibroker.
 Please help me with this..

 I'm testing it with a simple Ema crossover system. It buy on
 ema-crossover and Sell if price goes above or below 5 points from the buy
 price.

 I'm able to write the Buy condition. But i'm not able to write the sell
 condition. I'm confused whether I can write it as Sell condition or 
 should i
 write it with ApplyStop's .. please help me.

 e1 = EMA(C, 14);
 e2 = EMA(C, 5);

 Buy = Cross(e2, e1);
 Sell = (.. confused here .. )

 Thanks
 Prabu





  



Re: [amibroker] Re: how to create variables automatically as required

2010-06-01 Thread Inquisitive Voyager
Ya, that came to my mind too.
But later found,data compression shall not serve the purpose.

i have to add ranges of all bars in a year and then dividing the same by no.
of bars in that year.
Going for 12 monthly ranges shall not give the desired result.

Even inYearly option shall not serve the purpose.

On Tue, Jun 1, 2010 at 11:02 AM, Mike sfclimb...@yahoo.com wrote:



 The same link suggests that you can use multiples of the existing
 constants, e.g 12 * inMonthly. Give that a try.


 Mike

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  Thanks mike,
  any solution for 5.1 users except upgrade?
 
  On Tue, Jun 1, 2010 at 10:17 AM, Mike sfclimb...@... wrote:
 
  
  
   As of 5.20 it does.
   http://www.amibroker.com/guide/afl/afl_view.php?id=242
  
   Mike
  
  
   --- In amibroker@yahoogroups.com amibroker%40yahoogroups.comamibroker%
 40yahoogroups.com,
   Inquisitive Voyager hedonist2008@ wrote:
   
IMO,
TimeFrameSet does not have inYearly option.
Even by default AB has no option for yearly candles.
   
for that prashanth has made an AFL,but never used that.
   
regards
   
   
On Tue, Jun 1, 2010 at 10:03 AM, radmobile_radmobile danv83@wrote:
  
   


 You are trying to get the (H+L+C)/3 for each year for different
 stocks?
 Maybe just use TimeFrameSet(inYearly) . Not clear on what you want
 to
   do.


 --- In amibroker@yahoogroups.com 
 amibroker%40yahoogroups.comamibroker%
 40yahoogroups.comamibroker%

   40yahoogroups.com,
  
 Inquisitive Voyager hedonist2008@ wrote:
 
  (1)requirement: I want to create dynamic variables for each
 tickers
  according to data it possess.
 
  (2)details:suppose there is EOD data from 2000 to 2010.I have to
 calculate
  suppose average pivot(H+L+C)/3 etc per year.
 
  Every ticker doesn't have same data bars.some were listed in
   2000,some in
  2004,some in 2008 and like this.
 
  (3)point of application:
 
 
  _fd=WriteVal(BeginValue(DateTime()),formatDateTime );// first
 date
  _ld=WriteVal(LastValue(DateTime()),formatDateTime) ;//last date
 
  _fy=StrToNum(StrRight(_fd,4));// first year
  _ly=StrToNum(StrRight(_ld,4));// last year.
 
 
  now I have to create dynamic years between _fy and _ly.
 
  suppose _fy=2002 and _ly =2010,then AFL should create variable
 years
 between
  these two ,so that avg value per year could be calculated.
 
  (4)I went for -
 
  for(i=_fy;i=_ly;i++)
  {
 
  VarSet(_year+i,i);
 
  }
 
  but it is not working .
 
  does any body shall come up with the solution ?
 
  regards
 



   
  
  
  
 

  



Re: [amibroker] Loop for MA calculation

2010-06-01 Thread Inquisitive Voyager
_Sum=0;

LEN =10;

mm=0;
*

for* (i= LEN; i*BarCount*; i++)

{

//_Sum = 0;
*

for* (j = i-LEN; J==i-1; J++)

{

_Sum= _Sum+*C*[j];

}

mm[i] = _Sum/LEN;

}
ps:(1)Just removed the errors.
(2)express your logic distinctly so that it can be formulated.

On Tue, Jun 1, 2010 at 10:45 PM, ang_60 ima_c...@yahoo.it wrote:




 Hi,

 My purpose is to rebuild the MA function with the FOR... NEXT loops.
 Could you please check this formula, that gives me two syntax errors?

 _Sum=0;
 LEN =10;

 for (i= LEN; iBarCount; i++)

 {
 _Sum = 0;
 for (j = i-LEN; J=i-1; J++)
 {
 _Sum= _Sum+C(j);
 }
 mm(i) = _Sum/LEN;
 }

 



[amibroker] how to create variables automatically as required

2010-05-31 Thread Inquisitive Voyager
(1)requirement: I want to create dynamic variables for each tickers
according to data it possess.

(2)details:suppose there is EOD data from 2000 to 2010.I have to calculate
suppose average pivot(H+L+C)/3 etc per year.

Every ticker doesn't have same data bars.some were listed in 2000,some in
2004,some in 2008 and like this.

(3)point of application:


_fd=WriteVal(BeginValue(DateTime()),formatDateTime );// first date
_ld=WriteVal(LastValue(DateTime()),formatDateTime) ;//last date

_fy=StrToNum(StrRight(_fd,4));// first year
_ly=StrToNum(StrRight(_ld,4));// last year.


now I have to create dynamic years between _fy and _ly.

suppose _fy=2002 and _ly =2010,then AFL should create variable years between
these two ,so that avg value per year could be calculated.

(4)I went for -

for(i=_fy;i=_ly;i++)
{

VarSet(_year+i,i);

}

but it is not working .

does any body shall come up with the solution ?

regards


Re: [amibroker] Re: how to create variables automatically as required

2010-05-31 Thread Inquisitive Voyager
not only that,but  average range (H-L) and alike.
I shall definitely dwell on your suggestion.

regards

On Tue, Jun 1, 2010 at 10:03 AM, radmobile_radmobile dan...@gmail.comwrote:



 You are trying to get the (H+L+C)/3 for each year for different stocks?
 Maybe just use TimeFrameSet(inYearly) . Not clear on what you want to do.


 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  (1)requirement: I want to create dynamic variables for each tickers
  according to data it possess.
 
  (2)details:suppose there is EOD data from 2000 to 2010.I have to
 calculate
  suppose average pivot(H+L+C)/3 etc per year.
 
  Every ticker doesn't have same data bars.some were listed in 2000,some in
  2004,some in 2008 and like this.
 
  (3)point of application:
 
 
  _fd=WriteVal(BeginValue(DateTime()),formatDateTime );// first date
  _ld=WriteVal(LastValue(DateTime()),formatDateTime) ;//last date
 
  _fy=StrToNum(StrRight(_fd,4));// first year
  _ly=StrToNum(StrRight(_ld,4));// last year.
 
 
  now I have to create dynamic years between _fy and _ly.
 
  suppose _fy=2002 and _ly =2010,then AFL should create variable years
 between
  these two ,so that avg value per year could be calculated.
 
  (4)I went for -
 
  for(i=_fy;i=_ly;i++)
  {
 
  VarSet(_year+i,i);
 
  }
 
  but it is not working .
 
  does any body shall come up with the solution ?
 
  regards
 

  



Re: [amibroker] Re: how to create variables automatically as required

2010-05-31 Thread Inquisitive Voyager
IMO,
TimeFrameSet does not have inYearly option.
Even by default AB has no option for yearly candles.

for that prashanth has made an AFL,but never used that.

regards


On Tue, Jun 1, 2010 at 10:03 AM, radmobile_radmobile dan...@gmail.comwrote:



 You are trying to get the (H+L+C)/3 for each year for different stocks?
 Maybe just use TimeFrameSet(inYearly) . Not clear on what you want to do.


 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  (1)requirement: I want to create dynamic variables for each tickers
  according to data it possess.
 
  (2)details:suppose there is EOD data from 2000 to 2010.I have to
 calculate
  suppose average pivot(H+L+C)/3 etc per year.
 
  Every ticker doesn't have same data bars.some were listed in 2000,some in
  2004,some in 2008 and like this.
 
  (3)point of application:
 
 
  _fd=WriteVal(BeginValue(DateTime()),formatDateTime );// first date
  _ld=WriteVal(LastValue(DateTime()),formatDateTime) ;//last date
 
  _fy=StrToNum(StrRight(_fd,4));// first year
  _ly=StrToNum(StrRight(_ld,4));// last year.
 
 
  now I have to create dynamic years between _fy and _ly.
 
  suppose _fy=2002 and _ly =2010,then AFL should create variable years
 between
  these two ,so that avg value per year could be calculated.
 
  (4)I went for -
 
  for(i=_fy;i=_ly;i++)
  {
 
  VarSet(_year+i,i);
 
  }
 
  but it is not working .
 
  does any body shall come up with the solution ?
 
  regards
 

  



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 mailya...@tampabay.rr.com 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 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 do
 it*

 * *

 *Thank you for your help*

 * *

 *MarkK*

 * *

 * *

 



Re: [amibroker] Indicator design (no dots)

2010-05-25 Thread Inquisitive Voyager
parameter-axes  grid-show middle lines (make it no).

On Tue, May 25, 2010 at 6:13 PM, engineering_returns 
trade2live4e...@googlemail.com wrote:



 Hello AB Community,

 i want to create my own indicator (design).

 Is there a way of getting rid of the horizontal dots at all and/or specific
 for some indicators.

 I checked the PLOT command options, but couldn't find anything that hides
 the dots.

 Thanks
 Frank

 



Re: [amibroker] Digest Number 9285

2010-05-24 Thread Inquisitive Voyager
 does this complywith your logic?

_SECTION_BEGIN(hlp_pablo);

z1=MA(*H*,6);

z2=MA(*L*,6);
*

Buy*=Cross(*C*,Ref(z1,-1));
*

Sell*=Cross(Ref(z2,-1),*C*);

PlotShapes(*Buy***shapeUpArrow*+*Sell***shapeDownArrow*,IIf(*Buy*,*
colorGreen*,IIf(*Sell*,*colorRed*,*Null*)));

_SECTION_END();


On Mon, May 24, 2010 at 12:01 AM, Pablo Bozzolo boctu...@gmail.com wrote:



 Hi guys! I'm crazy because I can't understand the CROSS() function
 behaviour.

 The idea is built an indicator which must give Buy or Sell signals
 depending on the CLOSE price cross above / below 6-days-moving-averages of
 Hi / Lo prices. Ussually a x-shift is specified.

 My problem is this system give signals EVEN the close price do not cross
 the custom moving average as you can see in this graph:

 http://i848.photobucket.com/albums/ab44/pbozzolo9/problema.png

 METASTOCK code for Indicator Builder:

 xshift :=0;
 M6DH := Ref(Mov(H, 6,SIMPLE),xshift);
 Cross( C, M6DH );

 For AMIBROKER:

 xshift =0;

 M6DH = Ref(MA (H, 6),xshift);
 M6DL = Ref(MA (L, 6),xshift);

 Buy = Cross( C, Ref(M6DH,xshift) );
 Sell = Cross(Ref(M6DL,xshift),C );

 Plot( C,  Close Price, colorGrey50, styleBar );
 Plot( M6DL, MA 6d Lo , colorOrange,styleLine|styleNoRescale,Null, Null, 4
 );
 Plot( M6DH, MA 6d Hi , colorDarkBlue,styleLine|styleNoRescale,Null, Null,
 4 );

 PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorGreen, 0,Low,
 Offset=-20);
 PlotShapes(IIf(Sell==1, shapeDownArrow, shapeNone), colorRed, 0,High,
 Offset=-20);

 Any idea ? thank you very much! :)

 Pablo

 



[amibroker] is there any refined way?

2010-05-22 Thread Inquisitive Voyager
For EOD data, I want to calculate average of pivots(H+L+C)/3 or range
(H-L)per year for each ticker.

SO for I used raw coding-

foe ex.


a=0;//07-08

b=0;//08-09
*

for*(i=0;i249;i++)

{a+=(*H*[i]-*L*[i]);

}

a/=248;
*

for*(j=249;j494;j++)

{

b+=*H*[j]-*L*[j];

}

b/=245;



but this fails,for tickers with less data.new tickers etc.T

hat's why this can't be used in AA.

Is there any refined way so that I can calculate the avg range of the year
for each symbol.

problem is how to use the year function in 'if' loop?



regards


Re: [amibroker] 64-bit IQFeed / Interactive Brokers plugins

2010-05-20 Thread Inquisitive Voyager
adding my bit-
Even if physical ram is 4 gb, vista 32 bit version can use only 3.1 -3.2 GB
of RAM only.
System shall show 4 GB but but only 3.2 GB of RAM shall be utilized.

On Fri, May 21, 2010 at 3:42 AM, Tomasz Janeczko gro...@amibroker.comwrote:



 Hello,

 I would like to learn how many of you are already using Windows 64-bit
 edition
 and are interested in running native 64-bit IQFeed and Interactive
 Brokers plugins.

 Note that primary advantage of 64-bit Windows and apps is ability to
 address
 way more virtual memory than 32-bit system.

 Best regards,
 Tomasz Janeczko
 amibroker.com
 



Re: [amibroker] Request help simple back testing

2010-05-20 Thread Inquisitive Voyager
There is nothing wrong with the code.
filter generates less signals.
select the range as all quotations it shall give u more signals.
click on report to see the same.

On Thu, May 20, 2010 at 10:54 PM, ford7k for...@yahoo.com wrote:



 Hi afl experts

 Please help me get to my goal.
 I want to back test a simple thing
 objective

 Buy = Cross(RSI(14) ,50);
 Sell = Cross (50,RSI(14));
 Short= Sell; Cover=Buy;
 filter =buy or sell;
 data=eod, settings periodicity =daily,

 I tried to press backtest but nothing happens.

 in the settings table I am confused what settings to be chosen

 tick size, round lot etc

 can a senior give me right code and guidance please

 My aim is
 back test with rsi condition alone on 300days daily data
 back test with macd and rsi buy sell conditions on samedata
 finally evaluate which combination is more profitable

 with advance thanks
 ford

 



Re: [amibroker] restricted view of the chart

2010-05-18 Thread Inquisitive Voyager
Thanks Tomasz,
nothing could be better than that!

regards




On Mon, May 17, 2010 at 8:57 PM, Tomasz Janeczko gro...@amibroker.comwrote:



 Hello,

 Double click on start date, then double click on end date and choose
 View-Zoom-Zoom to range

 Best regards,
 Tomasz Janeczko
 amibroker.com


 On 2010-05-17 17:09, Inquisitive Voyager wrote:

 Shall it be possible, that a AFL Accepts 2 dates as parameter,and plots the
 chart with these dates as first bar and last bar respectively.

 ie chart should show only bars of dates between these 2 dates(including
 parameter dates).

 regards


  



Re: [amibroker] How to average the last 20 days Ranges

2010-05-17 Thread Inquisitive Voyager
_SECTION_BEGIN(avg_range);

bi=BarIndex();

Avgrange=Sum((*H*-*L*),20);

Avgrange/=20;

Plot(

IIf(biLastValue(bi)-21,*Null*,

Avgrange),avg range of 20 last bar,*colorAqua
*

);

_SECTION_END();


On Mon, May 17, 2010 at 5:50 AM, possum51au raine.temp...@gmail.com wrote:



 Hi
 I want to create an average of the last 20 bars Hi-Lo ranges - could some
 kind soul please help?
 Thanks

  



Re: [amibroker] Re: How to average the last 20 days Ranges

2010-05-17 Thread Inquisitive Voyager
replace a line as:


IIf(biLastValue(bi)-19,*Null*,


On Mon, May 17, 2010 at 6:46 AM, Mike sfclimb...@yahoo.com wrote:



 What you're describing is simply a 20 period moving average of the array
 resulting from the calculation: High - Low.

 http://www.amibroker.com/guide/afl/afl_view.php?id=94

 Mike


 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 possum51au raine.temp...@... wrote:
 
  Hi
  I want to create an average of the last 20 bars Hi-Lo ranges - could some
 kind soul please help?
  Thanks
 

  



[amibroker] restricted view of the chart

2010-05-17 Thread Inquisitive Voyager
Shall it be possible, that a AFL Accepts 2 dates as parameter,and plots the
chart with these dates as first bar and last bar respectively.

ie chart should show only bars of dates between these 2 dates(including
parameter dates).

regards


Re: [amibroker] To display last open signal

2010-05-05 Thread Inquisitive Voyager
Select the option- n last quotations and enter the value of n as 1.

On Tue, May 4, 2010 at 8:30 PM, kgirish_in
girish.krishnamur...@gmail.comwrote:



 Hi all,

 This is my first post on this forum. I'm relatively newbie to Amibroker.
 However, I have managed to code a few AFL's successfully and use them
 for my trading as well. I also have an explorer that throws signals for
 my trades.

 Currently, all the (BUY/SELL) signals are shown in the explorer for a
 defined period of days. However, what I'm trying to find out/do with my
 AFL is to display ONLY the last open signal for a list of stocks -

 Example - My table currently looks something like -

 ABC 3-May SELL Closing price Vol
 ABC 30-Apr BUY Closing price Vol
 ABC 28-Apr SELL Closing price Vol
 DEF 27-Apr BUY Closing price Vol
 ABC 26-Apr BUY Closing price Vol
 XYZ 25-Apr SELL Closing price Vol
 DEF 25-Apr SELL Closing price Vol

 What I need is the following -

 ABC 3-May SELL Closing price Vol
 DEF 27-Apr BUY Closing price Vol
 XYZ 25-Apr SELL Closing price Vol.

 Any pointers/suggestion on how I can do in this Ami will be really
 helpful. Thanks in advance.

 Cheers,
 Girish

 



Re: [amibroker] Re: Importing additional data in Ami

2010-05-05 Thread Inquisitive Voyager
(1)First import value data as open int.
(2)once u do this,whatever else u desire to do could be done in AFL or
commentary.

On Wed, May 5, 2010 at 9:27 AM, shahariar4 shahari...@yahoo.com wrote:



 Hi:

 I use EOD data and my downloaded data include o,h,l,c and value data..

 In charts normally we see o,h,l,c in title but i want to make use of the
 value data and see it in charts(I import all the data using import
 aschiii option)

 What i want to do with my value data is- use it for some calculations like-
 take every 3 days value data and average that and name that as my close
 price and make an ema based moving average of that value dataAny help
 regarding the way to use the value data?

 Regrads,

 --- In amibroker@yahoogroups.com amibroker%40yahoogroups.com,
 Inquisitive Voyager hedonist2...@... wrote:
 
  (1)First do u need that column?
  If no skip that column else read on-
 
  (2)u did not mention whether it is cash or future data?
  if cash data u can get the aforesaid in open interest column provided
 your
  exchange does not give something like total deliverable shares or allied
 in
  this head.
 
  On Tue, May 4, 2010 at 3:20 PM, shahariar4 shahari...@... wrote:
 
  
  
   Hi..while i download data in ami the csv file contains O,H,L,C price
 and an
   additional column of Value ( total value of the money of a particular
   stock)
  
   I use import aschii to import data to ami..
  
   How can i show or use the Value data?Does it reequire any format.aqe
 file?
   Any help will be appreciated
  
  
  
 

 



Re: [amibroker] Importing additional data in Ami

2010-05-04 Thread Inquisitive Voyager
(1)First do u need that column?
If no skip that column else read on-

(2)u did not mention whether it is cash or future data?
if cash data u can get the aforesaid in open interest column provided your
exchange does not give something like total deliverable shares or allied in
this head.

On Tue, May 4, 2010 at 3:20 PM, shahariar4 shahari...@yahoo.com wrote:



 Hi..while i download data in ami the csv file contains O,H,L,C price and an
 additional column of Value ( total value of the money of a particular
 stock)

 I use import aschii to import data to ami..

 How can i show or use the Value data?Does it reequire any format.aqe file?
 Any help will be appreciated

 



Re: [amibroker] Slow of the close of ^DJI

2010-05-03 Thread Inquisitive Voyager
NumToStr(ROC(*Close*,1,1.1));


On Mon, May 3, 2010 at 7:54 PM, WaldemarRooijer walde...@itsolutions.anwrote:



 Dear members,

 I am learning the AFL language for a few weeks and one issue I still could
 not figure out yet is how can I get the 2 day slope (ore maybe just %change)
 of ^DJI close.

 Any help is appreciated