Traderji.com - Discussion forum for Stocks Commodities & Forex

AmiBroker formula Language

Discuss AmiBroker formula Language at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hello Praveen Thanks for your guidance. I will be thankful to you if you solve ...


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

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #51  
Old 28th November 2006, 03:04 PM
Member
 
Join Date: Oct 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
siddhakala is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

Hello Praveen

Thanks for your guidance. I will be thankful to you if you solve my one problem.

When I plot Moving Averages on Candle stick chart, they are plotted behind the candles which creates problem to observe crossover, if it is behind the candle. How to bring them forward, in front of candle?

Thanks

Sudesh
Reply With Quote
  #52  
Old 28th November 2006, 03:23 PM
Member
 
Join Date: Apr 2006
Location: Kuwait
Posts: 214
Thanks: 0
Thanked 0 Times in 0 Posts
sivavkm is on a distinguished road
Reputation: 22
Default Re: AmiBroker formula Language

Quote:
Originally Posted by siddhakala View Post
Hello Praveen

Thanks for your guidance. I will be thankful to you if you solve my one problem.

When I plot Moving Averages on Candle stick chart, they are plotted behind the candles which creates problem to observe crossover, if it is behind the candle. How to bring them forward, in front of candle?

Thanks

Sudesh
Edit your code, and change the sequence of plot order, first plot your moving averages then plot candle
Reply With Quote
  #53  
Old 29th November 2006, 09:38 AM
Member
 
Join Date: Oct 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
siddhakala is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

Hello sivavkm

Thanks.
Reply With Quote
  #54  
Old 30th November 2006, 10:44 AM
Member
 
Join Date: Oct 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
siddhakala is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

Hello Friends,

Is it possible to build a High-Low Zig Zag in with AFL. High-Low Zig Zag focuses two series of data, High and Low i.e if we want to plot H-L Zig Zag of 5% reversal then if trend is up on 5% Zig Zag then Zig Zag uses High data. When High falls below reversal value Zig Zag uses Low data. When low moves higher than reversal value Zig Zag uses High data and so on.

If we want to calculate H-L Zig Zag Reversal of 5% then, if the trend is up, reduce 5% from high to arrive at reversal value. The reversal value will change on new highs. So reduce 5% form new high to get new reversal value.

The reversal value will remain same if the price fluctuates between the new High and the Reversal Value.

The trend will turn bearish if High moves below Reversal Value.

When trend is bullish we track High series of data e.g. if High is 100 then 5% reduced of the high is Rs.95, which is our Reversal Value . Next day if high goes above 100 say 110 Reversal Value changes to 5.5 (110-5) if next high remains below 100 Reversal Value remains same and our trend remains bullish till high falls below Reversal Value. As soon as High falls below Reversal Value trend changes from bullish to bearish and Reversal Value is calculated with help of Lows.

When trend is bearish we track Low series of data e.g. if Low is 90 the add 5% to Low to get Reversal Value i.e. 4.5. The reversal Value will change on new Low. If next day low falls below 90 Add 5% to Low to get new Reversal Value.

Reversal Value will remain same till price fluctuates between Lowest Low point and Reversal Value.

Now trend will Turn Bullish when Low moves above Reversal Value.

When Trend turns Bullish we can go Long and when Trend turns Bearish we can go Short this works well on Nifty.

Is it possible to build this system in AFL. I will be thankful if any body can help to write code for this. I have done this in excel sheet and attached herewith.


Sudesh
Reply With Quote
  #55  
Old 30th November 2006, 03:56 PM
SGM SGM is offline
Member
 
Join Date: Aug 2005
Location: PUNE
Posts: 468
Blog Entries: 14
Thanks: 11
Thanked 33 Times in 11 Posts
SGM will become famous soon enough
Reputation: 73
Default Re: AmiBroker formula Language

Quote:
Originally Posted by siddhakala View Post
Hello Friends,

Is it possible to build a High-Low Zig Zag in with AFL. High-Low Zig Zag focuses two series of data, High and Low i.e if we want to plot H-L Zig Zag of 5% reversal then if trend is up on 5% Zig Zag then Zig Zag uses High data. When High falls below reversal value Zig Zag uses Low data. When low moves higher than reversal value Zig Zag uses High data and so on.

If we want to calculate H-L Zig Zag Reversal of 5% then, if the trend is up, reduce 5% from high to arrive at reversal value. The reversal value will change on new highs. So reduce 5% form new high to get new reversal value.

The reversal value will remain same if the price fluctuates between the new High and the Reversal Value.

The trend will turn bearish if High moves below Reversal Value.

When trend is bullish we track High series of data e.g. if High is 100 then 5% reduced of the high is Rs.95, which is our Reversal Value . Next day if high goes above 100 say 110 Reversal Value changes to 5.5 (110-5) if next high remains below 100 Reversal Value remains same and our trend remains bullish till high falls below Reversal Value. As soon as High falls below Reversal Value trend changes from bullish to bearish and Reversal Value is calculated with help of Lows.

When trend is bearish we track Low series of data e.g. if Low is 90 the add 5% to Low to get Reversal Value i.e. 4.5. The reversal Value will change on new Low. If next day low falls below 90 Add 5% to Low to get new Reversal Value.

Reversal Value will remain same till price fluctuates between Lowest Low point and Reversal Value.

Now trend will Turn Bullish when Low moves above Reversal Value.

When Trend turns Bullish we can go Long and when Trend turns Bearish we can go Short this works well on Nifty.

Is it possible to build this system in AFL. I will be thankful if any body can help to write code for this. I have done this in excel sheet and attached herewith.


Sudesh
Hello Sudesh

Find attached afl (rename the txt extention). Please note that it is an attempt by a novice, and do verify if it is what you want.

Hope you find it useful. If you need any changes or enhancements do let me know, I can just promise an attempt.

Regards
Sanjay

PS: Attaching one more version using HHV/LLV instead of Peak and Trough functions. Gives out a nice graph, but do not use the afl for buy/sell signals just yet, seems to be some problem with the code. Will upload another version tonight
Attached Images
File Type: png sudesh-sample-chart.PNG (32.8 KB, 154 views)
Attached Files
File Type: txt Sudesh's HighLow ZigZag.txt (1.2 KB, 157 views)
File Type: txt Sudesh's HighLow ZigZag HHV-LLV.txt (1.4 KB, 119 views)
File Type: txt Sudesh's HighLow ZigZag Peak.txt (1.2 KB, 104 views)

Last edited by SGM; 30th November 2006 at 06:01 PM. Reason: Attaching additional files
Reply With Quote
  #56  
Old 30th November 2006, 10:53 PM
Member
 
Join Date: Oct 2006
Posts: 51
Thanks: 0
Thanked 0 Times in 0 Posts
siddhakala is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

Hello Sanjay

Thank you very much for code. You have done realy a nice job. First two codes are working fine but I can not understand the 3rd code ie. ZigZag Peak. HHV/LLV is working much better than Peak Trough.

What you have done is excellent and very useful.

Thanks
Sudesh
Reply With Quote
  #57  
Old 1st December 2006, 09:15 AM
SGM SGM is offline
Member
 
Join Date: Aug 2005
Location: PUNE
Posts: 468
Blog Entries: 14
Thanks: 11
Thanked 33 Times in 11 Posts
SGM will become famous soon enough
Reputation: 73
Default Re: AmiBroker formula Language

Quote:
Originally Posted by siddhakala View Post
Hello Sanjay
First two codes are working fine but I can not understand the 3rd code ie. ZigZag Peak. HHV/LLV is working much better than Peak Trough.
Dear Sudesh

Just ignore the ZigZag Peak/Trough code alltogether. The first version of HHV/LLV was also quite crude, I uploded it to verify if that is what you want. Here's a improved version with High and Low Reverals plotted.

There are 2 more conditions i.e 1. when both the signals are True and 2. when both are False, i have indicated them on the charts with clouds, lightgrey is when none of the high or low values are in 5% zone (here the color of graph also changes to black), and bright green cloud is when both of them are in in 5% zone (here the color of graph continues to be blue).

The % for reversal is selectable for both high and low.

The no of bars for scanning the High/Low is set to be default 22 bars (aprox 1 month on EoD) this is also made selectable.

All parameters are seperate for high and low.

Spend some time on adjusting the parameters and please let me know which are the best settings for them.

Hope the afl is useful to you.

Regards
Sanjay
Attached Files
File Type: txt Sudesh's HighLow Zigzag-2.txt (2.4 KB, 130 views)
Reply With Quote
  #58  
Old 1st December 2006, 06:42 PM
Member
 
Join Date: Jul 2006
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Roshanna is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

hi guys,
just to help the members.
There is a site called "Amibroker fans" (same one where some guy was palming off Karthik's Indicators as his own)
well this site has all the Amibroker Library afls as a single .rar file. (will save pain of indivdually downloading every single one )
try it if anyone is so inclined
cheers
Reply With Quote
  #59  
Old 7th December 2006, 04:22 AM
Member
 
Join Date: Sep 2006
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
drshukla is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

Quote:
Originally Posted by Roshanna View Post
hi guys,
just to help the members.
There is a site called "Amibroker fans" (same one where some guy was palming off Karthik's Indicators as his own)
well this site has all the Amibroker Library afls as a single .rar file. (will save pain of indivdually downloading every single one )
try it if anyone is so inclined
cheers
hellow dear rosh

what is the exact adress of this site?
Reply With Quote
  #60  
Old 2nd January 2007, 10:07 PM
Member
 
Join Date: Jan 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
hmandeel is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

Thanks for your input,

I however think that Amiroker should have had a proper manual for AFL rather than leaving us nonprogrammers to figureout what te hell does this code mean.

Regards,

HM
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 formula Language
Thread Thread Starter Forum Replies Last Post
need help on formula cmlee MetaStock 23 8th October 2007 07:55 PM
Metastock ,Metatrader & Amibroker indicator formula saji oommen MetaStock 0 4th June 2006 06:35 PM
Metastock language help Ropewalker MetaStock 4 1st November 2005 09:16 PM
TradeStation & MetaStock Formula Language bikertrader MetaStock 4 10th December 2004 01:50 PM


All times are GMT +5.5. The time now is 12:34 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