| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Zorro https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=921 |
Page 11 of 12 |
| Author: | jcl [ Mon Nov 02, 2015 2:12 pm ] |
| Post subject: | Zorro |
The code is just the algorithm of a Renko bar (I hope). If you use it, you trade and test with Renko bars. Otherwise you would trade and test with standard bars. But for trading you need some system of when to open and close positions. The Renko bar code is just for the bars. It does not trade. |
|
| Author: | Shoddy [ Tue Nov 03, 2015 9:39 am ] |
| Post subject: | Zorro |
Yes I understand that the bars do not trade, I was just in the dark as how to the bar function worked, a friend did some testing and found out that, as far as we understand, the bar function is used to replace the calculation of bars in general during the script, never seen that before in any language. Cool! But I think the renko calculation is a bit wrong, when we plot the bars sometimes we get bull/bear bars right next to each other on the same 'height', the close of a bull bar is the next open of a bear bar, that's incorrect, we'll have to do some more testing. Thanks! //R |
|
| Author: | jcl [ Tue Nov 03, 2015 10:16 am ] |
| Post subject: | Zorro |
Yes, the bar() function replaces standard bars. It is in fact possible that the Renko bar calculation is wrong - if I remember right, the Renko algorithm was described slightly differently on several websites, so I am not sure which algorithm is the "true" one. But you can change the algorithm as you want and experiment with it. If you find the true Renko, please let me know. |
|
| Author: | Shoddy [ Tue Nov 03, 2015 5:35 pm ] |
| Post subject: | Zorro |
Will do |
|
| Author: | hirdman [ Wed Nov 04, 2015 12:50 pm ] |
| Post subject: | Zorro |
Hi, I'm the friend =) I think I have solved the renko bars at a trend change now: Code: Select all |
|
| Author: | jcl [ Thu Nov 05, 2015 9:41 am ] |
| Post subject: | Zorro |
Thanks! Your algorithm indeed produces more bars and more details in the bar curve. I'll mention the several Renko variants in the Zorro documentation and will include your code, with your permission. I think it does not matter much which one is the original Renko - the best version is always the version with the best profits. |
|
| Author: | hirdman [ Thu Nov 05, 2015 11:54 am ] |
| Post subject: | Zorro |
But of course, feel free to include it just glad to contribute in some small way. =) I've matched it to a Renko generated in Empty4 and it correlates quite well, not an exact match but close enough. |
|
| Author: | ForMyEx [ Thu Dec 24, 2015 4:24 pm ] |
| Post subject: | Zorro |
Hi all, I just started with zorro and I'm glad to have the experts here The features Zorro offers out of the box are very valueable in my opinion. Especially things like the neural network (@jcl: would be great if you share some experiments with us regarding this) and the walk forward optimization. I'm don't have any C programming experience but know Java, so I hoped that learning Lite-C would be a piece of cake but it isn't. Since I just play around and am still far away from developing a profitable EA with Zorro I decided to take the first step towards "taking money from the rich and givint it to the poor" by adding two Indicators to indicators.c that you might know as well: Dr. Elders BullsPower and BearsPower, which are calculated slightly different from what Dr. Elder describes, but anyways. In MQL this would look somehow like that: Code: Select all Code: Select all Code: Select all IndicatorTest compiling.................. Undefined function called! BackTest: IndicatorTest EUR/USD 2015 Error 037: Invalid value in plot "BullsPower" bar 1 Chart - please wait.. ok Do anyone of you guys know what's wrong with the code in the indicators.c file? I obviously don't know Merry Christmas to all of you! Bye Ahmet |
|
| Author: | jcl [ Thu Dec 24, 2015 4:45 pm ] |
| Post subject: | Zorro |
I see two simple syntax errors: The EMA function needs a series, so it should be series(price()). And series elements are accessed with [], not (), so it's priceHighs[0] for the recent price. Have a great Christmas! |
|
| Author: | ForMyEx [ Thu Dec 24, 2015 10:15 pm ] |
| Post subject: | Zorro |
Hi jcl, thank you for the tips. So now the corrected code looks like this: Code: Select all IndicatorTest compiling................... Undefined function called! BackTest: IndicatorTest EUR/USD 2015 Error 037: Invalid value in plot "BullsPower" bar 1 Chart - please wait.. ok Two errors seem to exist: 1. Undefined function called! Which function is it referring to? Unfortunately it does not give me any hint (name, or line number) where to look for it. A little frustrating. 2. Error 037 The FAQs say that there could be a false calculation result, which leads to this error. So I suspect the BullsPower function in the indicators.c file. Unfortunately I did not find any means of debugging. Am I missing something? How can I check what the function is calculating? Can I introspect the execution? |
|
| All times are UTC | Page 11 of 12 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|