| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Coding for beginners - this is how Steve started https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=301 |
Page 2 of 7 |
| Author: | SteveHopwood [ Wed Feb 01, 2012 9:56 pm ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
I found an upload limit that I changed to unlimited. I am not sure if this solves the problem, so would you care to try again with the single zip and report back? |
|
| Author: | ironrick [ Wed Feb 01, 2012 10:41 pm ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
Hmmm.... Still says: Don't what it means exactly but maybe it will help in your settings search. Lemme know and I will try again R |
|
| Author: | gaheitman [ Wed Feb 01, 2012 10:44 pm ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
Perhaps it requires a restart of the board. |
|
| Author: | SteveHopwood [ Thu Feb 02, 2012 12:16 am ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
Not a clue, but thanks anyway. Tomorrow, I can at least point people in the direction of your posts to fill in the gaps. Thanks for everything you have done. |
|
| Author: | fxozgirl [ Sun Mar 18, 2012 1:02 pm ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
You will need to have ftp access to the forum to change php.ini Not sure what sort of access Steve has to the source code of the forum, but that's what he will need |
|
| Author: | SteveHopwood [ Sun Mar 18, 2012 2:10 pm ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
None that I know of. The software lives on the server, which is owned by Erwin's company. |
|
| Author: | scalpz [ Wed Apr 04, 2012 1:13 am ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
Found a couple of gold nuggets in relation to Steve's coding methods. Posting here so other cut & paste coders like me can see them when reading this thread. Post from straight after in same Fmfx-auto trader thread: And almost like Steve says, "Good luck. We need it." cheers Scalpz |
|
| Author: | scalpz [ Tue Apr 24, 2012 10:51 am ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
Found another nugget, this one from Squalou in Scoob's Forex Robot thread - cheers scalpz edit: sorry, maybe these 2 posts should be in the Utilities/code snippets thread at http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=166 - needs a mod to shift them, or take out this edit if they disagree. ta. |
|
| Author: | SteveHopwood [ Tue Apr 24, 2012 11:26 am ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
I had not seen sq's post, so this is news to me. It also explains a struggle I had a while ago, when I knew two numbers to be the same but the program would not recognise this. I had to get around it by putting them both into a string and comparing that instead. Would you copy this into the utilities thread as well, please? Info like this needs dissemination. Nice one. Cheers |
|
| Author: | garyfritz [ Tue Apr 24, 2012 5:56 pm ] |
| Post subject: | Re: Coding for beginners - this is how Steve started |
Warning, educational but geeky detail ahead: As much as we all love Empty4's many and varied failings, we can't blame Empty4 for this one. This is common to virtually any language that handles floating-point values. The CPU hardware that represents and manipulates numbers doesn't work in decimal the way we do. The numbers are represented in binary (base 2 instead of base 10). When it's an int (integer) value, that's no problem -- binary integer values are exactly equal to decimal integer values, so integer 1234 == integer 1234, all the time. But floating-point numbers are represented by a long binary number, and that binary number is often not precisely equal to **ANY** decimal value. So e.g. "double x = 1./3.;" produces a value that can't be exactly printed in decimal -- and probably can't be exactly represented in binary, either. But when you PRINT a number, the binary value gets converted to decimal, and probably truncated to some number of decimal places. Generally print functions don't print stuff that's 8-10 decimal places past the main value -- because you don't want "5" to get printed as "5.00000000001436284" -- but it's still there in the binary value. That printed decimal value is an APPROXIMATION of the exact binary value stored in the variable. And -- the binary value is not always exactly what you think. E.g. "double y = 5.0;" is probably represented precisely as 5.0, exactly. But "double y = 15. / 3.;" or "double z = sqrt(25.);" might NOT be precisely 5.0. It might be approximately 5.00000000001436284. They LOOK the same when you print them the normal way, but they're not EQUAL. And the == operator (in MQL and in most languages) tests for EQUAL. EXACTLY equal. Bit-for-bit identical. And internally, in the double variable, 5.0 is NOT exactly bit-for-bit identical to 5.00000000001436284. So the == test fails. I wouldn't even guarantee that "NormalizeDouble(A-B,8) == 0.0" would always work. 0.0 is well-represented in binary floating point and it will be EXACTLY zero. NormalizeDouble to 8 decimal places MIGHT represent it as exactly zero, or it might not. Depends on how NormalizeDouble is implemented. I don't know how CompareDoubles is implemented either. Hopefully it's safe, but this IS Empty4 we're talking about. If you're paranoid you could use something explicit like "#define ReallySmall 0.00000001; if ((A-B) < ReallySmall) { ..." That should work for most cases you're likely to run into in MQL. But if you're comparing really tiny numbers, like atomic weights or the IQ of Empty4 designers, even that might fail. E.g. if x is 10^-20 and y is 10^-21, x is actually 10x larger than y. They're not even close to equal. But x-y is 0.00000000000000000009, which is much smaller than ReallySmall, so the test above would say they're equal. To handle cases like that, you'd want to do something like "if ((A-B)/B < ReallySmall) { ..." (and don't forget to test if B==0 first). That scales the A-B value so the ReallySmall test works even for Really Small values of A and B. [/pedantry] |
|
| All times are UTC | Page 2 of 7 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|