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; Originally Posted by bvpraveen Hello Murthy and friends, Although the AFL is ready now, its ...


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

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #31  
Old 6th November 2006, 11:21 PM
Member
 
Join Date: Sep 2005
Location: hyderaabd
Posts: 744
Thanks: 0
Thanked 4 Times in 4 Posts
murthymsr is on a distinguished road
Reputation: 31
Default Re: AFL for importing NSE Bhavcopy

Quote:
Originally Posted by bvpraveen View Post
Hello Murthy and friends,

Although the AFL is ready now, its not upto what I initially thought of. Facing some problems. Please let me know any solutions for these:
.............................
Praveen.
dear praveen,
i am sorry, as i have already told the other day during chat, i have no knowledge of C, and have no answers to your querries.

this forum is full of highly knowledgeable computer programmers, i wish, surely somebody may give the clarification needed by you.

by the way, if a solution is not coming within, you may think of presenting the revised code without the GUI interface and the related reduction of features.

all the best.
murthymsr
Reply With Quote
  #32  
Old 7th November 2006, 12:02 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 913
Thanks: 0
Thanked 16 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 48
Default Re: AFL for importing NSE Bhavcopy

Quote:
Originally Posted by murthymsr View Post

if a solution is not coming within, you may think of presenting the revised code without the GUI interface and the related reduction of features.
Hi,

Will post the updated AFL today evening..

Praveen.
Reply With Quote
  #33  
Old 7th November 2006, 02:08 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 friends,

How to use Identifiers (O,H,L,C) or indicator's value in if(). Eg.
If(C>EMA(20))
{
statement;
statement;
}
this code gives error. I tried above by defining a numeric variable and then assign value of indicator or identifier to that variable. But after assigning identifier or indicator’s value to numeric variable “if()’ gives error. Can anybody explain why and how to solve this problem. I don’t want to use IIF.

Sudesh
Reply With Quote
  #34  
Old 7th November 2006, 03:20 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 913
Thanks: 0
Thanked 16 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 48
Default Re: AmiBroker formula Language

Quote:
Originally Posted by siddhakala View Post
Hello friends,

How to use Identifiers (O,H,L,C) or indicator's value in if(). Eg.
If(C>EMA(20))
{
statement;
statement;
}
this code gives error. I tried above by defining a numeric variable and then assign value of indicator or identifier to that variable. But after assigning identifier or indicator’s value to numeric variable “if()’ gives error. Can anybody explain why and how to solve this problem. I don’t want to use IIF.

Sudesh
Hi Sudesh,

'if' conditional statement takes only boolean value and NOT array. Your code should be:

ema20 = EMA(C, 20);
for( i = 0; i < BarCount; i++ )
{
if( Close[ i ] > ema20[i])
statement1;
else
statement2;
}

The below code taken from Amibroker user guide will explain you in detail:


...........
Expression must be boolean ( True/False) type (so it CANNOT be ARRAY because there would be no way do decide whether to execute statement1 or not, if for example array was: [True,True,False,.....,False,True] )
..........
if( Close > Open ) // WRONG
Color = colorGreen; //statement 1
else
Color = colorRed; //statement 2

The above example is wrong, as both Open and Close are arrays and such expression as Close > Open is also an ARRAY. The solution depends on the statement. Its either possible to implement it on bar−by−bar basis, with use of FOR loop:

for( i = 0; i < BarCount; i++ )
{
if( Close[ i ] > Open[ i ] ) // CORRECT
Color[ i ] = colorGreen;
else
Color[ i ] = colorRed;
}

Let me know if i'm wrong anywhere.
Praveen.
Reply With Quote
  #35  
Old 7th November 2006, 09:43 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 913
Thanks: 0
Thanked 16 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 48
Default UPDATED AFL for importing NSE Bhavcopy

Hello Friends,

So here it is: Updated AFL for converting NSE Bhavcopy.

You can use this AFL like an indicator, just by drag and drop.
The AFL can find the source filename from the current date and do all the necessary operation automatically WITHOUT any user help. Use this option only when you do the update daily. This type of importing wont work when you import one days' Bhav copy on some other day. In this case you need to explicitly provide the source file name as explained in the AFL. This is because the AFL will AUTO DETECT the source file name based on the day when you import it.

I tried my level best to make it GUI enabled. But facing some issues with it, which i've already posted. If any one can sort it out, we can make it GUI enabled.

Please let me know if you find any problems in it or need any further improvement.

Thanks,
Praveen.
Attached Files
File Type: txt Import NSE Bhavcopy Ver1.2.txt (3.8 KB, 390 views)

Last edited by bvpraveen; 8th November 2006 at 04:52 PM. Reason: Corrected some typos
Reply With Quote
  #36  
Old 7th November 2006, 09:59 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

Thank you bvpraveen

Sudesh
Reply With Quote
  #37  
Old 11th November 2006, 01:25 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 913
Thanks: 0
Thanked 16 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 48
Default Re: UPDATED AFL for importing NSE Bhavcopy

Quote:
Originally Posted by bvpraveen View Post
Hello Friends,

So here it is: Updated AFL for converting NSE Bhavcopy.
Hey,

Did anyone try this AFL? Please let me know if you had faced any problems or errors in it.

Praveen.
Reply With Quote
  #38  
Old 11th November 2006, 01:37 PM
Member
 
Join Date: Jul 2006
Posts: 5
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
mnh8303 is on a distinguished road
Reputation: 20
Default Re: AmiBroker formula Language

nice ...please reply for this......based on these formulae given by u

http://www.traderji.com/equities/952...nottostay.html
Reply With Quote
  #39  
Old 11th November 2006, 02:39 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 913
Thanks: 0
Thanked 16 Times in 2 Posts
bvpraveen is on a distinguished road
Reputation: 48
Default Re: AmiBroker formula Language

Quote:
Originally Posted by mnh8303 View Post
nice ...please reply for this......based on these formulae given by u

http://www.traderji.com/equities/952...nottostay.html
Hello friend,

The formula is just an ordinary Bhav copy convertor, and its not used a system for trading.

If you are referring to such AFLs posted in this thread, I'm very sorry friend, honestly I've not tried them yet.

Better you take one by one, and start testing them.

All the best,
Praveen.
Reply With Quote
  #40  
Old 15th November 2006, 07:35 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 Friends

Can anybody guide me about how to use scanning future of AmiBroker?
If I want to scan list of stocks matching following conditions:

1. ADX is >30 and rising
2. Last bar was streddling 20EMA ie. H>20EMA>L
2. Close > previous close and L > 20EMA

Sudesh
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 04:51 AM.

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