![]() |
|
| 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 ... |
|
|||||||
| Notices |
![]() |
|
|
Thread Tools |
| Sponsored Links |
|
#1
|
|||
|
|||
|
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. |
| Sponsored Links |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
OK
THANKS i 'll post it there. |
|
#4
|
|||
|
|||
|
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 |
|
#5
|
|||
|
|||
|
No , it's OK. I've found it. You have to use the ref function.
|
|
#6
|
|||
|
|||
|
Quote:
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 |
|
#7
|
|||
|
|||
|
Quote:
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. |
|
#8
|
|||
|
|||
|
hello,
I am Ajith , I am new to this site. Regards Ajith |
|
#9
|
|||
|
|||
|
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. |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | |
|
|
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 |
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.