| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Slopey Peaky Bob https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5389 |
Page 80 of 84 |
| Author: | dclayw [ Thu Apr 07, 2022 7:21 am ] |
| Post subject: | Slopey Peaky Bob |
@Steve thanks for taking a look, hopefully I'm not barking up the wrong tree again. I did do a quick test on M5 to generate some quick fire recoveries and it did leave the pendings in place after recovery had finished. Some traders may actually want it that way but once I bail out I usually want to get out completely and wait for next signal. Pendings are also left in place when using what I call an SS stop. As a specific buy trade example with SsSlopeBuyAbove=2 and CloseBuysBelow=-1,When SS hits -1 market buy trades will close but the actual SS signal has not changed and the pendings will be left in place. The option to DeletePendingTradesOnOppositeSignal will have no affect in this situation. Again some traders may want to keep the pendings in this situation but when I get out via an SS stop I want to get completely out and wait for next signal. So maybe a setting to remove pendings in this case would also be useful. I'm using v2t which I have stuck with because I know it to be very stable. |
|
| Author: | SteveHopwood [ Sun Apr 17, 2022 2:53 pm ] |
| Post subject: | Slopey Peaky Bob |
Latest version of the core library is in post 1. For the DIYers, here is the cause of the problem. Go to: void closeAllTrades(string symbol, int type) You will see this block of code: Code: Select all Towards the end of the function is the block that starts with: if (pass == 1). This looks for pending orders. The code immediately underneath is: if (deletePendings) This only allows deletion if the boolean deletePendings is set to 'true'. Then go to: void doRecoveryClosure(string symbol, int pairIndex) Here I see two problems: 1) deletePendings is not set to 'true', so closeAllTrades() would ignore them, even if it got that far which it would not because: 2) The calls to closeAllTrades() will only close market buy and sell orders. The solutions are: Scroll down to the Alert that begins with: Alert(symbol, " ", TradeComment, " buy trades Recovery Insert this immediately above: deletePendings = true; Then scroll down to the Alert that begins with: Alert(symbol, " ", TradeComment, " sell trades Recovery Insert this immediately above: deletePendings = true; The calls to the closeAllTrades() are either: closeAllTrades(symbol, OP_BUY); or closeAllTrades(symbol, OP_SELL); These need changing to: closeAllTrades(symbol, AllTrades); Then load SPB Latest Version into the editor and recompile. There may be other places where calls to closeAllTrades() need editing. These will emerge with use. In case you find this confusing, here is the edited function: Code: Select all |
|
| Author: | matrixebiz [ Mon Jun 13, 2022 8:00 pm ] |
| Post subject: | Slopey Peaky Bob |
Good Day, I have started SPB LV running on a platform today and seems great so far but I'm just confused by one thing in post 1; "The "Slopey Peaky Bob.mqh" file This goes in your platform's /Include folder and is an essential component. No member of the SPB tribe will work without it." 1) Where can I get this file as it's not included in Post 1 and 2) is it actually needed for this EA since it's not called from in the EA? Thank you and sorry if I missed something. |
|
| Author: | matrixebiz [ Thu Jun 16, 2022 3:52 pm ] |
| Post subject: | Slopey Peaky Bob |
Hey Steve, I woke this morning to see a profit at +$250 so I closed everything then started the EA again. Would you have done the same or should I have just still let it do its thing until Friday close all? |
|
| Author: | matrixebiz [ Fri Jun 24, 2022 8:17 pm ] |
| Post subject: | Slopey Peaky Bob |
Looks like the EA has a glitch closing all trades on Friday; It's Friday after 16:00 local time but all trades are still running. |
|
| Author: | TableTop [ Fri Jul 01, 2022 9:17 am ] |
| Post subject: | Slopey Peaky Bob |
As a complete noob to automated trading, I took a look at SPB on Steve's recommendation. For any other noobs, I can thoroughly recommend it. Stick a few versions on demos and play with the settings, and see if you can work out exactly why each trade was opened and closed. Brilliant. However, it's not idiot-proof! I started a very small live account a couple of weeks ago and it was doing exactly what I wanted, making some money! I used to work in the software industry (project/programme management not coding) so I know that I should have left the platform (my VPS, clean Empty4 instance, and SPB configuration) alone and treated it as a bank would treat a 'production' system - i.e. do not touch! Instead, I added another indicator to the chart template, opened all the charts, and caused Empty4 to lock up. After a bit of panic and resetting/rebuilding stuff, SPB was back up and running. I then noticed a couple of positions not being managed in the way I was expecting, and spent several hours checking each setting, referring to the user guide, scratching my head and swearing quite a bit. I was sure I had discovered a bug. I then several more hours trying to reproduce the bug. What I eventually found was that I'd been an idiot! When I restarted everything I missed the 'allow DLL imports' check box My advice (FWIW) to anyone new to automated trading is to treat your live-trading environment with care. (This is true for manual trading but even more so with automated trading.) Have a development/test machine to develop a strategy and play with new indicators; ideally, have a separate machine for testing strategies on demo, and keep a separate machine/VPS for live trading. Only make changes to live have been tested on a test/demo machine (which should be a fairly close representation of your live platform). ----- Note to moderators: I'm not sure if this belongs here (on the thread or even the forum) so please move/delete it as appropriate. |
|
| Author: | acostafulano [ Wed Aug 03, 2022 1:03 am ] |
| Post subject: | Slopey Peaky Bob |
Hello Steve, This has been mentioned before, but I think it's worth re-posting the question to make sure it's properly addressed- I've had events in which some open baskets Close at a significant Drawdown, despite having "CloseMarketTradesonOppositeColour" and "DeletePendingTradesonOppositeColour" BOTH set to FALSE A couple of examples below. Now, looking into the code I found the Culprits could be the following lines of code: I tried experimenting with them by Changing them to False, but all this generates is for Situations in which you have an opposite Signal (for example, Open SELL Basket and a full BUY SIGNAL comes on), for the sells to REMAIN OPEN, and only have a new BUY Basket Opening. Which defeats the purpose. (Example Below): Is there any solution for this or any changes we need to do to the code to obtain the desired result? which is simply avoid Closures of open baskets and leave them open indefinitely until they hit TP? Thank you. |
|
| Author: | SteveHopwood [ Wed Aug 03, 2022 2:16 pm ] |
| Post subject: | Slopey Peaky Bob |
I do not understand your question. Nor can I find the code you have quoted. Are you using Latest Version 2W? |
|
| Author: | acostafulano [ Wed Aug 03, 2022 9:10 pm ] |
| Post subject: | Slopey Peaky Bob |
Yes. 1W The code in question is around this part of the code: And the question is if the Internal Logic of the EA can be checked as to make sure we will not get Basket Closures at Opposite direction signals (Despite Having this Option turned OFF, it is happening in some ocassions, as per my examples in my last post). I would like the baskets to go on indefinitely until TP. (which I know sounds ill-advised but can work with proper MM) Thank you Diego |
|
| Author: | matrixebiz [ Fri Aug 19, 2022 12:32 pm ] |
| Post subject: | Slopey Peaky Bob |
2W is the latest not 1W ... 1W should be removed from post 1 but the EA has bombed this week and last anyway |
|
| All times are UTC | Page 80 of 84 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|