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

RE: [amibroker] Re: Coding assistance.



PureBytes Links

Trading Reference Links

Anthony,
 
 
Again, thank you. What I am trying to determine is how many days in a row the stock is setting higher highs and higher lows, as opposed to a moving average. Is this possible to code?
 
Tom
 
-----Original Message-----
From: Anthony Faragasso [mailto:ajf1111@xxxxxxxx]
Sent: Saturday, March 19, 2005 4:17 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Coding assistance.

Tom,
 
You have yet to define what you consider as trending....here is another sample:
 

periods=Param("periods",10,1,100,1);//N period moving average

trendingup=BarsSince(L < MA(L,periods));

trendingdown=BarsSince(H > MA(H,periods));

Filter=1;

AddColumn(trendingup,"up",1);

AddColumn(trendingdown,"down",1);

 

Anthony

 

----- Original Message -----
From: carstuff
Sent: Friday, March 18, 2005 5:53 PM
Subject: RE: [amibroker] Re: Coding assistance.

Thank you. I ran your script and realized that I asked the wrong question. What I am trying to determine is if the price has been in a "continuous" up or down trend for n periods.
 
Tom
 
 
-----Original Message-----
From: Anthony Faragasso [mailto:ajf1111@xxxxxxxx]
Sent: Friday, March 18, 2005 12:11 PM
To: amibroker@xxxxxxxxxxxxxxx
Subject: Re: [amibroker] Re: Coding assistance.

Depends on how you want to define trending Higher or lower..Here is a sample explore...
 

//Automatic analysis

//Explore

//all symbols

//n last quotations

//n=1

periods=10;

trending=ROC(C,periods);

trendingUP=trending > 0;

trendingDown=trending < 0;

state=WriteIf(trendingup,"trendingUP for ("+WriteVal(periods,1)+") periods ","trendingdown for ("+WriteVal(periods,1)+")periods");

Filter=1;

AddTextColumn(state,"State");

----- Original Message -----
From: carstuff
Sent: Friday, March 18, 2005 12:39 PM
Subject: [amibroker] Re: Coding assistance.

Would someone be able to tell me how to write a condition to a scan that says 'if prices are trending either higher or lower for n periods'?
 
Thank you
Tom


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html





No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.308 / Virus Database: 266.7.3 - Release Date: 3/15/2005


Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html






Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html




Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links