Traderji.com - Online community for Indian investors & traders!


OLD Analysis vs NEW Analysisdocs in OLE

Discuss OLD Analysis vs NEW Analysisdocs in OLE at the AmiBroker within the Traderji.com - Online community for Indian investors & traders!; The old analysis object is able to set the rangefromdate and rangetodate but it said ...


Go Back   Traderji.com - Online community for Indian investors & traders! > TOOLS & RESOURCES > Software > AmiBroker


Reply
 
Thread Tools
  #1  
Old 15th July 2013, 11:27 PM
Member
 
Join Date: Dec 2012
Posts: 80
Thanks: 13
Thanked 4 Times in 4 Posts
fishmarket is on a distinguished road
Post OLD Analysis vs NEW Analysisdocs in OLE

The old analysis object is able to set the rangefromdate and rangetodate but it said that this object is obsolete. But the new automatic analysis is using "ANALYSISDOCS", however it seems that it does not contain the properties for specifying the range to scan or explore. Is that true? If yes, what is the new advantages of using the "ANALYSISDOCS", given that Old analysis is more flexible in settings. Thanks.

Analysis

This object is obsolete. It is provided only to maintain compatibility with old code. Analysis object always accesses OLD Automatic Analysis.

Properties:

RangeMode As Long
RangeN As Long
RangeFromDate As Date
RangeToDate As Date
ApplyTo As Long

Reference:
http://www.amibroker.com/guide/objec...l#AnalysisDocs



Reply With Quote
Sponsored Links
  #2  
Old 16th July 2013, 12:18 AM
Member
 
Join Date: Mar 2012
Posts: 414
Thanks: 15
Thanked 520 Times in 221 Posts
trash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of light
Default Re: OLD Analysis vs NEW Analysisdocs in OLE

OLE is not multi-threading friendly. It is old Microsoft technology.

Old Analysis is not multi-threaded. New one is.

And in New analysis you can save project files (.apx) that save your AFL and save all settings and for example can call them from outside. And those apx files are of type XML. So they are easily readable/editable also.


Code:
Hello,

For what is worth - it is highly discouraged to use OLE inside any AFL
formula including scripting parts because OLE is not multithreaded.


For popup windows there is one, easy, multi-threading friendly and script-less
method:

native AFL PopupWindow function
http://www.amibroker.com/f?popupwindow

Best regards,
Tomasz Janeczko
amibroker.com
etc. etc.

Last edited by trash; 16th July 2013 at 12:32 AM.
Reply With Quote
The Following User Says Thank You to trash For This Useful Post:
fishmarket (16th July 2013)
  #3  
Old 16th July 2013, 12:27 AM
Member
 
Join Date: Mar 2012
Posts: 414
Thanks: 15
Thanked 520 Times in 221 Posts
trash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of light
Default Re: OLD Analysis vs NEW Analysisdocs in OLE

.............

Quote:
Hello,

Could you please send your entire formula to support so we can actually run it ?
Plus send your settings too (go to the old Settings window and press "Save" and send .abs file).
Only then (after running actual formula that you use) things can be analyzed and proper answer can be given.

Generally speaking New Analysis window in 5.49 is way faster. On my end all explorations
run 10 times faster in New Analysis window.
I am not however, doing things that are inherently slow like inefficient use of OLE.

First you need to verify if you are really using 5.49.2. Earlier versions behave differently. Specifically
5.49.2 has specifically implemented a feature that guarantees that code that has
Status("stocknum")==0 statement run first symbol in one thread, WAITS until it is complete
and only then it runs other threads.

Secondly, you should strictly avoid calling CreateObject() and any OLE methods when NOT necessary.
Using OLE means that all threads calling it must STOP and wait for UI thread to handle any OLE call.
This is because of how Microsoft designed OLE, see:
http://blogs.msdn.com/b/oldnewthing/...4/8420242.aspx
You need to keep in mind that OLE is very old technology and it is NOT multithreaded. Any OLE call
is always handled by one and only one UI (user interface) thread with additional overhead if you attempt to do that from
other (working) threads.


So if your code needs to do some OLE processing on very first symbol only, you should write

if( Status("stocknum") == 0 )
{
// do ANY OLE COM only if absolutely needed,
AB = CreateObject("Broker.Application");

AS = AB.Stocks;
count = AS.Count;


}

That will guarantee that other threads do not need to suffer from OLE deficiencies.

Calling OLE unconditionally - outside if statement - just adds unnecessary wait for UI thread
and it is slow and effectively prohibits multithreading.


Best regards,
Tomasz Janeczko
amibroker.com

Last edited by trash; 16th July 2013 at 12:33 AM.
Reply With Quote
The Following User Says Thank You to trash For This Useful Post:
fishmarket (16th July 2013)
  #4  
Old 16th July 2013, 12:37 AM
Member
 
Join Date: Mar 2012
Posts: 414
Thanks: 15
Thanked 520 Times in 221 Posts
trash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of light
Default Re: OLD Analysis vs NEW Analysisdocs in OLE

http://www.amibroker.com/guide/h_multithreading.html
Reply With Quote
  #5  
Old 16th July 2013, 01:30 AM
Member
 
Join Date: Dec 2011
Posts: 1,383
Thanks: 1,718
Thanked 1,056 Times in 616 Posts
mastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud of
Default Re: OLD Analysis vs NEW Analysisdocs in OLE

Quote:
Originally Posted by trash View Post
OLE is not multi-threading friendly. It is old Microsoft technology.

Old Analysis is not multi-threaded. New one is.

And in New analysis you can save project files (.apx) that save your AFL and save all settings and for example can call them from outside. And those apx files are of type XML. So they are easily readable/editable also.


Code:
Hello,

For what is worth - it is highly discouraged to use OLE inside any AFL
formula including scripting parts because OLE is not multithreaded.


For popup windows there is one, easy, multi-threading friendly and script-less
method:

native AFL PopupWindow function
http://www.amibroker.com/f?popupwindow

Best regards,
Tomasz Janeczko
amibroker.com
etc. etc.
How do I disable my entire AFL from getting embedded into the .apx file. When formula is embedded, as I amend/update/fix errors in the AFL file, .apx file continues to refer to its own embedded copy which I cannot easily update
because all line feeds are replaced with \r\n
Reply With Quote
  #6  
Old 16th July 2013, 02:41 AM
Member
 
Join Date: Mar 2012
Posts: 414
Thanks: 15
Thanked 520 Times in 221 Posts
trash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of light
Default Re: OLD Analysis vs NEW Analysisdocs in OLE

Quote:
Originally Posted by mastermind007 View Post
How do I disable my entire AFL from getting embedded into the .apx file. When formula is embedded, as I amend/update/fix errors in the AFL file, .apx file continues to refer to its own embedded copy which I cannot easily update
because all line feeds are replaced with \r\n
To update your APX file is pretty easy, IMO.

Click File>Open... and browse to your apx file and open it.
If the afl embedded in your apx file is equal to the afl in your formulas folder then nothing will happen (no pop up message will appear) and the analysis opens with your settings and embedded afl.

If your afl is not equal to the afl of your formulas folder then a pop up message will appear asking you whether you want to keep the afl that is part of your formulas folder or whether you want to overwrite that afl with the afl of your project file. So since you wanna keep the AFL of your formulas folder you click the first option of that pop up message. Then the analysis window opens and then go to File>Save. That's it and your updated AFl is now part of your project file.
Reply With Quote
  #7  
Old 17th July 2013, 05:10 AM
Member
 
Join Date: Dec 2011
Posts: 1,383
Thanks: 1,718
Thanked 1,056 Times in 616 Posts
mastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud ofmastermind007 has much to be proud of
Default Re: OLD Analysis vs NEW Analysisdocs in OLE

Quote:
Originally Posted by trash View Post
To update your APX file is pretty easy, IMO.

Click File>Open... and browse to your apx file and open it.
If the afl embedded in your apx file is equal to the afl in your formulas folder then nothing will happen (no pop up message will appear) and the analysis opens with your settings and embedded afl.

If your afl is not equal to the afl of your formulas folder then a pop up message will appear asking you whether you want to keep the afl that is part of your formulas folder or whether you want to overwrite that afl with the afl of your project file. So since you wanna keep the AFL of your formulas folder you click the first option of that pop up message. Then the analysis window opens and then go to File>Save. That's it and your updated AFl is now part of your project file.
Trash

Thanks for responding.

Unfortunately, it does not do that (or maybe I've got some setting wrong)

Suppose name of exploration afl is xyz.afl and name of analysis is xyz.apx. I run it thru WScript (.js) file. What it does is it creates another copy of AFL with name like xyz_imported.afl and continues to refer to it (as I keep editing and reediting afl and keep wondering how come none of my changes are appearing when I ran thru script.
Reply With Quote
  #8  
Old 17th July 2013, 04:29 PM
Member
 
Join Date: Mar 2012
Posts: 414
Thanks: 15
Thanked 520 Times in 221 Posts
trash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of lighttrash is a glorious beacon of light
Default Re: OLD Analysis vs NEW Analysisdocs in OLE

Quote:
Originally Posted by mastermind007 View Post
Trash

Thanks for responding.

Unfortunately, it does not do that (or maybe I've got some setting wrong)

Suppose name of exploration afl is xyz.afl and name of analysis is xyz.apx. I run it thru WScript (.js) file. What it does is it creates another copy of AFL with name like xyz_imported.afl and continues to refer to it (as I keep editing and reediting afl and keep wondering how come none of my changes are appearing when I ran thru script.
No, it works for me. You are possibly doing something wrong.

Do the apx file update manually. Re-read my post.


Reply With Quote
Reply

Bookmarks

Tags
ole analysisdocs analysis


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: OLD Analysis vs NEW Analysisdocs in OLE
Thread Thread Starter Forum Replies Last Post
Fundamental analysis vs Technical analysis ioshean Fundamental Analysis 51 24th November 2013 07:35 PM
Technical Analysis Vs Fundamental Analysis omega Technical Analysis 2 2nd September 2013 05:01 PM
Why is technical analysis more popular than fundamental analysis in. India? Mr.G Technical Analysis 24 10th June 2013 02:17 PM
Technical Analysis v/s Fundamental Analysis brbharat Introductions 1 20th August 2009 01:17 PM
What is Difference between Technical Analysis Software and Trend Analysis Sotware harishsoni Software 3 4th April 2008 10:51 PM


All times are GMT +5.5. The time now is 10:20 PM.

Indemnity, Disclaimer & Disclosure Notice:
By visiting Traderji.com you automatically indicate that you agree to our Forum Rules, Indemnity, Disclaimer & Disclosure Notice and General Content Disclaimer Notice and indemnify Traderji.com, its associates and related parties of all claims howsoever resulting from the usage of the forum/site.
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. You are recommended to make appropriate enquiries and seek appropriate advise before sending money, incurring any expenses, acting on recommendations or entering into any commitment in relation to any advertisement published here. Traderji.com does not vouch for any claims made by the advertisers of products and services. Traderji.com will not be held liable for any consequences in the event such claims are not honoured by the advertisers. Traderji.com will not be liable for any, direct or indirect, consequential or incidental damages or loss arising out of the use of any information by anybody mentioned anywhere on this site.
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 or legality of any 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. Although we constantly delete all irrelevant content and/or SPAM, if you should 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 © www.Traderji.com 2001 - , All rights reserved.

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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70