Traderji.com - Discussion forum for Stocks Commodities & Forex

Amibroker - AFL Examples

Discuss Amibroker - AFL Examples at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hello, For new users of amibroker i am attaching two AFL for use. I got ...


Go Back   Traderji.com - Discussion forum for Stocks Commodities & Forex > TOOLS & RESOURCES > Software > AmiBroker

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #101  
Old 21st October 2007, 06:15 PM
Member
 
Join Date: Aug 2005
Posts: 222
Thanks: 0
Thanked 1 Time in 1 Post
saji oommen is on a distinguished road
Reputation: 31
Default Re: Amibroker - AFL Examples

Hello,

For new users of amibroker i am attaching two AFL for use. I got it from another source and claim no credit for it. Later on i will post few more.

Regards

Saji
Attached Files
File Type: zip AFL.zip (1.6 KB, 440 views)
Reply With Quote
Sponsored Links
  #102  
Old 21st October 2007, 09:19 PM
Member
 
Join Date: Oct 2006
Location: Cochin
Posts: 290
Thanks: 5
Thanked 0 Times in 0 Posts
kuriako will become famous soon enough
Reputation: 51
Smile Re: Amibroker - AFL Examples

Dear Saji,

Some of the earlier examples u posted had "mysteriously" vanished...

Thank you for being back in full form!!!

Thank you for the help!
Reply With Quote
  #103  
Old 21st October 2007, 09:25 PM
Member
 
Join Date: Aug 2005
Posts: 222
Thanks: 0
Thanked 1 Time in 1 Post
saji oommen is on a distinguished road
Reputation: 31
Default Re: Amibroker - AFL Examples

Hello Kuriakose

So you are from cochin. here is one of the missing.

SL = ( HHV( H, 22 ) + LLV( L, 22) )/2;
TL = ( HHV( H, 7) + LLV( L, 7 ) )/2;
DL = Ref( C, 22 );
Span1 = Ref( ( SL + TL )/2, -22 );
Span2 = Ref( (HHV( H, 44) + LLV(L, 44))/2, -22);
High=H;
Close=C;
Low=L;
TL=TL;
SL=SL;
DL=DL;
Span1=Span1;
Span2=Span2;
TLH=(TL+H)/2;
TLC=(TL+C)/2;
SLH=(SL+H)/2;
SLC=(SL+C)/2;
Span1=Span1;
Span2=Span2;

MaxGraph = 6;

Plot(SL,"SL",colorBlue,styleThick); // standard, base, or kijun-sen line
Plot(TL,"TL",colorRed,styleThick); // turning, conversion, or tenkan-sen line
Plot(DL,"DL",colorBlack,styleLine); // delayed, lagging, or chikou span
Plot(Close,"Close",colorYellow,styleLine,styleThic k); // price close


Buy= Cross(C , TL ) ;
Sell=Cross(TL , C);
IIf( (Buy),PlotShapes(shapeUpArrow*Buy,colorBlue),0);
IIf( (Sell),PlotShapes(shapeDownArrow*Sell,colorRed),0) ;

Title = "{{NAME}} - {{INTERVAL}} {{DATE}} - Ichimokku -11: {{VALUES}}";
Reply With Quote
  #104  
Old 22nd October 2007, 08:50 PM
Member
 
Join Date: Oct 2006
Location: Cochin
Posts: 290
Thanks: 5
Thanked 0 Times in 0 Posts
kuriako will become famous soon enough
Reputation: 51
Smile Re: Amibroker - AFL Examples

Japanese Indicator!!!

Happened to read a pdf on it!!!

Thanks Saji!!!

BTW a PM is on the way to your box!!!
Reply With Quote
  #105  
Old 1st December 2007, 02:56 PM
Member
 
Join Date: Sep 2007
Posts: 6
Thanks: 2
Thanked 0 Times in 0 Posts
rappu001 is on a distinguished road
Reputation: 20
Cool Re: Amibroker - AFL Examples

[quote=saji oommen;64868]Hello Sanjay,


So since you are willing to give it a try and already has made some attempts i will give you a good AFL. It is called ichimokku. It is available in the library. But i have made certain modifications. The japanese are experts in trading and have better systems than western ones.

So open up your Amibroker , put this AFL on daily data, or weekly and study carefully what lines are doing under different market conditions and various scrips. it will give you lot of good profitable trades. But you need to find A WAY to avoid some false signals. Easisest method is to take the signal risk with proper money management and position size. ie get out with your commission loss or stoploss figure if trade goes against you or use it in combination with some other indicator. Another method is not to take long positions when price under MA(C,15). Vice versa for shorts. Keep a watch on the slope of MA(C,15) also to remove false signals.

One good feature of this AFL code is the lines does not vacillate too much . Only when there is a strong reversal of trend it crosses. When the trend is strong the lines are in smooth movement.

Another advantage is you can set your price targets and stoplosses using the red and blue lines. The DL line(black) is not necessary. I mask it using the // before plot statements. if necessary google and find more about ichimokku.


thank you saji for introducing me to the wondreful world of ichimoku.
view of a mountain man! it really is.
i goooogled it and the information i received was contradicting most of the trading method you described.
in your afl you have masked the DL line, in fact most of the information sources describe DL line as the final arbiter in making a trading decision.
also the price/TL newer considered as trading signal.
and you haven't given importance to clouds.
please make a comment
[
Reply With Quote
  #106  
Old 23rd January 2008, 12:28 PM
Member
 
Join Date: Dec 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
darius is on a distinguished road
Reputation: 10
Default Re: Amibroker - AFL Examples

i want to draw some support or resistance levels on the price chart .but when i try to plot it plots the historical support and resistance levels.i only want the last support and res level only to be plotted ie the plots on the price graph should be against a single(last ) value of the resistance and suppport .ie the resistance and the support plots should be parallel to x axis.how do i proceed
Plot(Resistance1,"R1",colorRed);
right now i am using this plot function but it gives me the plot for all the support and resistance levels the stock has undergone.i only want to plot the latest support and resistance levels. iam using the formula

Pivot = ( Ref(High,0) + Ref(Close,0) + Ref(Low,0) )/3;
Resistance3 = Ref(High,0)+ 2 * (Pivot - Ref(Low,0));
Resistance1 = 2 * Pivot - Ref(Low,0);
Support1 = 2 * Pivot - Ref(High,0);
Resistance2 = Pivot + (Resistance1 - Support1);
Support2 = Pivot - (Resistance1 - Support1);
Support3 = Ref(Low,0)- 2 * (Ref(High,0) - Pivot);
Plot(Resistance1,"R1",colorRed);
Plot(Resistance2,"R2",colorRed);
Plot(Resistance3,"R3",colorRed);
Plot(Support1,"S1",colorOrange);
Plot(Support2,"S2",colorOrange);
Plot(Support3,"S3",colorOrange);

i found the resistance and support level logics from another thread in this forum.plz help me out
Reply With Quote
  #107  
Old 24th January 2008, 08:46 AM
Member
 
Join Date: Mar 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
sholay is on a distinguished road
Reputation: 20
Default Re: Amibroker - AFL Examples

Hi Saji

I am new to ami broker. I read this thread fully. It was interesting to read about Ichi afl. The old attached files are missing in this thread. so please repost the final afl so that I can understand the same and alos post any reading material on that.

Thanks
Reply With Quote
  #108  
Old 7th February 2008, 06:12 PM
Member
 
Join Date: Mar 2007
Posts: 94
Thanks: 253
Thanked 7 Times in 5 Posts
ramash is on a distinguished road
Reputation: 27
Default Re: Amibroker - AFL Examples

Dear Saji,

Have joined traderji recently. have read ur posts on Teach a man to fish
and am trying to understand it better. Thanks a lot for your efforts for newbies like me.

Meanwhile i need a help in coding the following condn. I tried it many times but am getting some errors. kindly please help me with this if u find time.

rsi<50 and macd>0 and 4sma>17sma>34ema>50sma to go long

rsi<40 and macd<0 and 4sma<17sma<34ema<50sma to go short

i can do only 2 condns at a time.

so please guide me in this.

ramash75
Reply With Quote
  #109  
Old 13th February 2008, 09:35 AM
Member
 
Join Date: Oct 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
syb23411 is on a distinguished road
Reputation: 20
Default Re: Amibroker - AFL Examples

sir,

can anyone help me with a AFL to scan the stocks for the following conditions:

1. Price rises continuously for 3 days with increase in volume in each day .
2. Price decreases continuously for 3 days with increase in volume in each day.


Thanking you in advance
Reply With Quote
  #110  
Old 17th February 2008, 03:52 PM
Member
 
Join Date: Nov 2006
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
pkb007 is on a distinguished road
Reputation: 20
Default Re: Amibroker - AFL Examples

Quote:
Originally Posted by saji oommen View Post
Hello,

I have attached a Zip file containing few basic AFL for Amibroker users. Some are explorations and others are indicators which will plot the indicator on the chart sheet.

I am not sure these AFL are in Amibroker library. What i usually do is study all the AFL i can lay my hands on and modify it(if necessary) to suit my trading methods and personality.

I would suggest Amibroker users to study the help file in Amibroker to learn more about AFL codes. Ultimately after some serious effort and hardwork you will be able to find one or two indicators to trade profitably.

Intially when i started using Amibroker i had used around 40 chart pages to plot all indicators to analyse them. That is if you put 2 indicators in a chart sheet i had more than 80 indicators. Some will work in trending market, some will work well only in bearish or consolidation market. Ulitimately after lot of effort you will come across 2-3 indicators that will work in all market conditions if used individually or combined.

Now i have finally settled down 1-2chart pages and maximum 3 indicators for generating buy or sell signals. I had used NSE data from 1995 to check it out by visualising manually on various scrips of different price ranges and in different market conditions. I did not use back test. I prefer visualisation method. It is strenous in the begining but patterns that emerge are highly reliable and profitable.

The trading signals generated with money management is working very well.

What i am trying to convey is it is very much possible to find two or three indicators to trade profitably in all types of market conditions whether it is a bullish, bearish or consolidation market. And the surprise part is that these indicators will be the least complex and right under our noses and would have been ignored by lot of people including ourselves.

Regards

Saji
hello thanks for your great job but i don`t get zip file where is this if u can please send it to my mail id at navinbhatia100@************ or send it link.
thanks in advance
Reply With Quote
Sponsored Links

Reply

Bookmarks


Advertise Here


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Similar Threads for: Amibroker - AFL Examples
Thread Thread Starter Forum Replies Last Post
AmiBroker karthikmarar Your Feedback & Suggestions 8 30th July 2006 12:22 PM
amibroker uncle sam AmiBroker 0 28th December 2004 06:01 PM


All times are GMT +5.5. The time now is 12:09 PM.

Indemnity, Disclaimer & Disclosure Notice:
• By visiting Traderji.com you indicate your acceptance of our Forum Rules Disclaimer & Disclosure and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum.
Disclaimer: Trading or investing in stocks & commodities is a high risk activity. Any action you choose to take in the markets is totally your own responsibility. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of this information.
Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein. The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.
 


Copyright © 2001 - 2008, Traderji.com All Rights Reserved.

Recommended Websites - www.TradersEdgeIndia.com - www.TradingPicks.com - www.MasterOfTrading.com