| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Currency Info https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=205 |
Page 1 of 1 |
| Author: | gaheitman [ Sat Dec 31, 2011 5:31 pm ] |
| Post subject: | Currency Info |
Often when someone starts to use a new EA, there are issues with particular brokers or pairs. Attached is a utility that will dump much of the useful MarketInfo() data for all/many/most/some of the pairs. I say that because I am using two methods to get the list of pairs for reporting. The default is just the majors, ripped indelicately from the Co-integration thread. The second method is from the ForexRobot thread, and reads the data of all pairs from the symbol file and just includes those that are currently in the market watch window. Very little of the script is my own work, more of a Frankenstein. The information is displayed on screen and, if the user chooses, copied to the clipboard for pasting into your favourite spreadsheet. The settings (you will be prompted when you drop the script on a chart): Code: Select all Code: Select all UPDATE: I have added a test to verify that the tick values reported by the server are correct. If they differ from the calculated values by more than 5%, you will see the following warning message: Let me know what additional information would be useful. |
|
| Author: | gaheitman [ Mon Jan 02, 2012 10:13 pm ] |
| Post subject: | Re: Currency Info |
For those of you curious about what happens when you open a new account and don't have any history, read on. It seems (in my limited testing) that any chart that is open for a particular timeframe will get 2048 bars downloaded immediately. I then waited a bit and ran the CurrencyInfo utility to check the number of bars in the other currencies and saw that none of the other pairs were getting updates. Now for the fun part -- actually running the CurrencyInfo utility triggered a download of 2048 bars of data for each currency. After further testing, it turns out the call to iBars() for each of the currencies is what triggered the downloads. It may be that any of the other i...() utilities (iHigh(), iLow, etc.) would trigger the same download. Before (as you can see, my current chart is open to EURUSD): During: I won't bore you with after. It all happened in less than a minute. So, it looks like if you want to make sure your EA has at least 2048 bars of data, call iBars(CurrencyToCheck,PeriodToCheck) and Empty4 will dutifully download the data. Not sure where 2048 comes from, other than being a nice computer number. I also thought it was interesting that the downloads occurred in LIFO order, they must just push requests on a stack for another process to do the downloads. Now if I can just get it to download more than 2048 bars.... George |
|
| Author: | Dozer [ Sat Nov 10, 2012 4:02 pm ] |
| Post subject: | Re: Currency Info |
Thanks for taking the time and effort to share this. Dozer |
|
| Author: | AnotherBrian [ Tue Apr 23, 2013 1:23 am ] |
| Post subject: | Re: Currency Info |
Thanks, I've used this more than once. |
|
| Author: | SatchFan [ Wed Apr 24, 2013 12:15 am ] |
| Post subject: | Re: Currency Info |
Wait a minute... I'm not a coder so I was not aware that you could make Empty4 post data to the WINDOWS clipboard! This changes things. I downloaded the script and took a look at it. Again, I'm not a coder but I see it's calling a couple of dll's. My question is, could something similar be done in an indicator, any indicator basically and make it where it can replace the playsound() function and instead print user specified text to the clipboard instead of playing a sound? I have a text to speech program that has a feature that will read out loud the text that is copied to the windows clipboard. This would be a good way to get past the ridiculous problem of Empty4 interrupting itself with it's alerts etc. because the text to speech program (I think) can speak multiple voices at once. I'll have to find out for sure... So basically whenever an indicator gets to the point where it is having an alert, and it usually plays a sound, it would be changed to "Print user specified text to windows clipboard". Is this possible? Peace, SatchFan |
|
| Author: | gaheitman [ Wed Apr 24, 2013 1:10 am ] |
| Post subject: | Re: Currency Info |
Yes, you can add it to an indicator. I just did a test to make sure. The code to add to the indicator is: Code: Select all George |
|
| Author: | SatchFan [ Wed Apr 24, 2013 11:49 pm ] |
| Post subject: | Re: Currency Info |
Thank You for posting that gaheitman! |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|