Traderji.com - Discussion forum for Stocks Commodities & Forex

Using the [ ] Identifier on amibroker

Discuss Using the [ ] Identifier on amibroker at the AmiBroker within the Traderji.com - Discussion forum for Stocks Commodities & Forex; Hello, I am a french trader and user of amibroker( former TS user ) ,and ...


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

Notices


Advertise Here

Reply
 
Thread Tools
Sponsored Links
  #1  
Old 17th October 2006, 06:13 PM
Member
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
equityraiser is on a distinguished road
Reputation: 20
Smile Using the [ ] Identifier on amibroker

Hello,

I am a french trader and user of amibroker( former TS user ) ,and I always have the same problems with array identifiers.

On TS, you simply use a variables between the brackets, but on ami, it seems like you have to put [barcount - var]...

Anyone can help me and tell where the error is in this code. It's a simple mov avg system referring to the past value of the mov avg:

Amount = Param( "dollz", 10000, 50, 1000000, 50 );
defMAL = Param("MAL", 10, 2, 200, 10 );
defR = Param( "Recul", 30, 2, 30, 2 );

MAL = Optimize( "MAL", defMAL, 2, 100, 5 );
R = Optimize( "Recul", defR, 1, 20, 2 );

PositionSize = Amount;

MyMA = MA( Close, MAL );

Buy = MyMA > MyMA[BarCount - R];
Sell = MyMA < MyMA[BarCount - R];

Short = MyMA < MyMA[BarCount - R];
Cover = MyMA > MyMA[BarCount - R];


Thanks for your help.
Reply With Quote
Sponsored Links
  #2  
Old 17th October 2006, 06:46 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: Using the [ ] Identifier on amibroker

Hello,

There are people with good knowledge of AFL in this forum. If they cannot help you i would suggest you go to amibroker@yahoogroups.com . That is where all the top experts in AFL are. They will surely help you.

Regards

Saji
Reply With Quote
  #3  
Old 17th October 2006, 10:53 PM
Member
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
equityraiser is on a distinguished road
Reputation: 20
Default Re: Using the [ ] Identifier on amibroker

OK

THANKS

i 'll post it there.
Reply With Quote
  #4  
Old 18th October 2006, 12:55 PM
Member
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
equityraiser is on a distinguished road
Reputation: 20
Default Re: Using the [ ] Identifier on amibroker

Please, is there someone to help me here? They just said me that the question has been asked before on yahoogroups.There is like thousands of threads. I didn't find it.

Please tell me a guy with sufficient knowledge. I will send him a private message.

Thanks a lot
Reply With Quote
  #5  
Old 18th October 2006, 02:06 PM
Member
 
Join Date: Oct 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
equityraiser is on a distinguished road
Reputation: 20
Default Re: Using the [ ] Identifier on amibroker

No , it's OK. I've found it. You have to use the ref function.
Reply With Quote
  #6  
Old 18th October 2006, 02:21 PM
Member
 
Join Date: Sep 2005
Location: hyderaabd
Posts: 777
Thanks: 20
Thanked 25 Times in 11 Posts
murthymsr will become famous soon enough
Reputation: 52
Default Re: Using the [ ] Identifier on amibroker

Quote:
Originally Posted by equityraiser View Post
Hello,

I am a french trader and user of amibroker( former TS user ) ,and I always have the same problems with array identifiers.

On TS, you simply use a variables between the brackets, but on ami, it seems like you have to put [barcount - var]...

Anyone can help me and tell where the error is in this code. It's a simple mov avg system referring to the past value of the mov avg:

Amount = Param( "dollz", 10000, 50, 1000000, 50 );
defMAL = Param("MAL", 10, 2, 200, 10 );
defR = Param( "Recul", 30, 2, 30, 2 );

MAL = Optimize( "MAL", defMAL, 2, 100, 5 );
R = Optimize( "Recul", defR, 1, 20, 2 );

PositionSize = Amount;

MyMA = MA( Close, MAL );

Buy = MyMA > MyMA[BarCount - R];
Sell = MyMA < MyMA[BarCount - R];

Short = MyMA < MyMA[BarCount - R];
Cover = MyMA > MyMA[BarCount - R];


Thanks for your help.
hi equityraiser,
i am not an expert on TA or AB, so not responded to your first post.

but i became inquisitive on your second post. i ran the AFL and the code ran without any errors after adding a few lines, required to running in explorer mode.

if you like, you may post some more information about what the code does, for a better understanding.

i am not sure if it helps or not, but i am posting the revised code and the exported csv files and the AFL code. (all files renamed to TXT extention)

all the best.
murthymsr
Attached Files
File Type: txt ModifiedAFL.txt (623 Bytes, 39 views)
File Type: txt Optimize.txt (45.0 KB, 31 views)
File Type: txt Output.txt (2.2 KB, 32 views)
Reply With Quote
  #7  
Old 2nd November 2006, 09:47 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 914
Thanks: 0
Thanked 33 Times in 3 Posts
bvpraveen will become famous soon enough
Reputation: 65
Default Re: Using the [ ] Identifier on amibroker

Quote:
Originally Posted by equityraiser View Post
Hello,

I am a french trader and user of amibroker( former TS user ) ,and I always have the same problems with array identifiers.

On TS, you simply use a variables between the brackets, but on ami, it seems like you have to put [barcount - var]...

Anyone can help me and tell where the error is in this code. It's a simple mov avg system referring to the past value of the mov avg:

Amount = Param( "dollz", 10000, 50, 1000000, 50 );
defMAL = Param("MAL", 10, 2, 200, 10 );
defR = Param( "Recul", 30, 2, 30, 2 );

MAL = Optimize( "MAL", defMAL, 2, 100, 5 );
R = Optimize( "Recul", defR, 1, 20, 2 );

PositionSize = Amount;

MyMA = MA( Close, MAL );

Buy = MyMA > MyMA[BarCount - R];
Sell = MyMA < MyMA[BarCount - R];

Short = MyMA < MyMA[BarCount - R];
Cover = MyMA > MyMA[BarCount - R];


Thanks for your help.
Hi,

I tried to write a better AFL, and came up with the one below. Let me know if
I'm wrong anywhere.

Amount = Param( "dollz", 10000, 50, 1000000, 50 );
defMAL = Param("MAL", 10, 2, 200, 10 );
defR = Param( "Recul", 30, 2, 30, 2 );

MAL = Optimize( "MAL", defMAL, 2, 100, 5 );
R = Optimize( "Recul", defR, 1, 20, 2 );

PositionSize = Amount;

MyMA = MA( Close, MAL );

for(i=R; i<BarCount; i++)
{
prevMA[i]=MyMA[i-R];
}

Buy = Cross(MyMA, prevMA);
Sell = Cross(prevMA, MyMA);


Thanks,
Praveen.
Reply With Quote
  #8  
Old 13th November 2006, 06:03 PM
Member
 
Join Date: Nov 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
ajith_kz is on a distinguished road
Reputation: 20
Default Re: Using the [ ] Identifier on amibroker

hello,
I am Ajith , I am new to this site.
Regards
Ajith
Reply With Quote
  #9  
Old 13th November 2006, 06:18 PM
Member
 
Join Date: May 2006
Location: Bangalore
Posts: 914
Thanks: 0
Thanked 33 Times in 3 Posts
bvpraveen will become famous soon enough
Reputation: 65
Default Re: Using the [ ] Identifier on amibroker

Quote:
Originally Posted by ajith_kz View Post
hello,
I am Ajith , I am new to this site.
Regards
Ajith
Hello Ajith,

Welcome to Traderji.

BTW, Ajith, there are different sections devoted for specific catergory. You can find them from the home page. Please try to post the messages in the respective sections so that you can get related replies.

All the best,
Praveen.
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: Using the [ ] Identifier on amibroker
Thread Thread Starter Forum Replies Last Post
Users of PIB & Amibroker cemcompusoft AmiBroker 40 22nd September 2008 10:21 PM
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 11:50 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