| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Hanover: an auto-trader using Recent Strength https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=31 |
Page 3 of 4 |
| Author: | garyfritz [ Mon Dec 12, 2011 6:19 am ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
OVERWHELMED is right! Steve you are a machine. I can't keep up with all the things you crank out. Doesn't help that you got a big head start on me. I've skimmed through much of the Hanover EA thread at FF but I don't see an explanation of the Hanover EA logic anywhere -- did I miss something? From digging through the code it looks like it calculates the Recent Strength on a user-specified set of timeframes (M1 - MN) and initiates a trade on pair XXXYYY when (and only when) currency XXX is strongest and currency YYY is weakest on all timeframes. Correct? Is the Hanover algorithm disclosed anywhere? I see only an ex4 and no explanation of how he generates his values. I have some ideas for how I'd create a Hanover-like indicator but I'd rather avoid reinventing the wheel. I'd like to implement some backtests of this on another platform and see how it behaves -- which might help the EA development process here. Dragos posted a simple way to calculate currency indices against the basket. You could use the short-term rate-of-change of those indices to create your own "recent strength" indicator but I don't know how that compares to the Hanover figures. Anybody know? |
|
| Author: | gaheitman [ Tue Dec 13, 2011 5:07 pm ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
Attached is a one-off implementation of the trade direction restriction. Please test before implementing in live. As a one-off, it doesn't get any of the incremental upgrades Steve would likely do when he made changes to a bot. To use the features, just set the following options: Code: Select all Let me know if you run into any problems. George |
|
| Author: | Panamamike [ Tue Dec 13, 2011 6:46 pm ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
Thanks. The last thing for Hanover will be to add the stack trading like with Joe, when the issues are worked out. |
|
| Author: | hankeys [ Thu Dec 15, 2011 4:39 pm ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
I have one question about Hanover. For some time i see, that he didnt take any trade. If i loo to my graph, i see the weakest and stronges currency from Recent Strenght indicator but in hanover there are still another data (EURUSD). it seems that Hanover doesnt restore the new data in Strenght indicator. If i close the Empty4, it recalculates the data, and everything is OK. if i want to click to the smile |
|
| Author: | SteveHopwood [ Thu Dec 15, 2011 10:35 pm ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
To be honest, I do not know. I managed to set H up on my trading machine so that it would generate signals that Carsten's utility would copy to any other platforms I want to use them. I do not want to have to do this again. My robots all ship with H as part of the code. I have no idea how the code works anymore, and fervently hope I shall never have to delve into it ever again. I simply trust enabling it and using WatchAndCopy to copy the relevant file into the platform will work. If anybody can generate a pdf with all the info that anyone needs who is meeting H for the first time, then that individual will have the undying gratitude of a lot of people - including me. Hehe. Welcome to my world guys. Everyone thinks coders know what we are doing. We do and we don't.
|
|
| Author: | zkucera [ Thu Dec 15, 2011 11:25 pm ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
I think the issue here is the following code in start() //Find open trades. //First check to see if a trade has closed and wait until it appears in the history tab. //TicketNo stores the open trade ticket during each call to DoesTradeExist(). if (TicketNo > -1 && !OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_TRADES) ) { while (!OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_HISTORY) ) Sleep(100); }//if (TicketNo > -1 && !OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_TRADES) ) Few lines above, the code says if (OrdersTotal() == 0) { TicketNo = -1; ForceTradeClosure = false; }//if (OrdersTotal() == 0) However, if there are manual orders or orders from other EAs, OrdersTotal() will NOT be 0 and TicketNo will be set to 0 (default value). The code needs to change to //Find open trades. //First check to see if a trade has closed and wait until it appears in the history tab. //TicketNo stores the open trade ticket during each call to DoesTradeExist(). if (TicketNo > 0 && !OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_TRADES) ) { while (!OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_HISTORY) ) Sleep(100); }//if (TicketNo > 0 && !OrderSelect(TicketNo, SELECT_BY_TICKET, MODE_TRADES) ) |
|
| Author: | SteveHopwood [ Thu Dec 15, 2011 11:48 pm ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
Sorry, but I do not understand. CountOpenTrades() first sets TicketNo to -1, which in turn is first declared as -1, so its initial value cannot be anything other than -1. So, TicketNo is only ever >-1 if the bot discovers an open trade. This allows for backtesting, when the first trade is trade no 0 (and no, I have never understood why the first anything in a list should be thngy no 0; a ludicrous idea that merely stacks up probs for the rest of us non-mathematical but more logical people and yes, that is indeed an irritable dig at the lunatics that insist on thingy no 1 actually being thingy no 0; drives me nuts) Hehe. I have managed to take a pot at quite a lot of people in just one post. |
|
| Author: | zkucera [ Fri Dec 16, 2011 12:25 am ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
Hi Steve, In version attached to post 1, CountOpenTrades() is commented out and is not called from start(). Am I looking at the wrong version? Kind Regards, Zeljko |
|
| Author: | gaheitman [ Fri Dec 16, 2011 12:35 am ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
CountOpenTrades() is the current standard. The Hanover code calls DoesTradeExist(), which also sets TicketNo to -1 if there is no active trade with the matching magic number and traded symbol. Same result, but the older code was for single-trade-at-a-time bots. As for why we start things with zero... You don't learn that until after you learn the secret handshake. George |
|
| Author: | SteveHopwood [ Fri Dec 16, 2011 12:38 am ] |
| Post subject: | Re: Hanover: an auto-trader using Recent Strength |
Sorry about that. In my latest bots, CountOpenTrades takes care of all trade tracking. In this one, it is DoesTradeExist() that does the equivalent job. When I started coding, DTE was fir single trade bots, whilst COT was for multiple traders. As things have evolved, DTE has lost its use and been abandoned. Sorry about that. In this context, DoesTradeExist should fulfil the function I described in my last post. Possibly. |
|
| All times are UTC | Page 3 of 4 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|