| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| HGB's Candle Power multi-pair combined trader and dashboard https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5324 |
Page 8 of 10 |
| Author: | dreambig2 [ Tue Dec 05, 2017 11:33 am ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
Hi Pandaboy, Are you closing at the end of each 4 hour cycle or are you closing at the end of the trading day? I have started a set and have several trades already well into profit into my first 4 hours. I also loaded Leons Strict daily before London open last night and see no pending or trades but I think trades and pendings come at end of day/beginning of new day if I understand correctly. thx db |
|
| Author: | eRIKb81 [ Tue Dec 05, 2017 7:03 pm ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
The whole-basket-close still is not working. It closed only the last ticket with the right magic number, in this case 1 out of 4 orders. Tried it again when the basket was in profit, this time no orders got closed. This makes me think something goes wrong in CountOpenTrades(string symbol, int PairIndex). Perhaps the block at line 1728 "//Whole position monitor if TradeWholePositionAsBasket is enabled" should be moved the the position after the "//Ensure the EA 'owns' this trade" block? I haven't done any programming in ages, but I hope I narrowed it down. The good news is that there was profit today! |
|
| Author: | SteveHopwood [ Tue Dec 05, 2017 8:09 pm ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
You have indeed. Thanks for sticking with this. Your solution of mucking around with CountOpenTrades() was so clearly wrong that it sent me looking elsewhere. The culprit was within void CloseAllTradesBelongingToEA(), which was closing only those trades held within the FifoTicket array. Only those trades belonging to the currently selected symbol would be held in this array. Peasants, my latest attempted fix is in post 1 - V 1k. Classy people, compare the new function with the existing one: Code: Select all Poor Relations in the US: this basket closure is still available to you, I think, despite your government's ludicrous FIFO rules. Every time a trade closure fails, it will set the WholePositionForceTradeClosure flag which in turn tells the bot to keep on trying to close trades. They will all close eventually. This might take a while. I suggest revolution and an overthrow of your government. |
|
| Author: | dreambig2 [ Tue Dec 05, 2017 8:43 pm ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
I did notice that old pendings were not being closed thus price was triggering these trades which appears contributing to the negative trades. Pretty sure these should have closed. Resetting platform and reloading set will see how goes next 4 hours. db |
|
| Author: | eRIKb81 [ Tue Dec 05, 2017 8:55 pm ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
Minibloop: you forgot to replace 'ForceTradeClosure' with 'WholePositionForceTradeClosure' in pass 0. Waiting for a profitable basket to test again |
|
| Author: | SteveHopwood [ Tue Dec 05, 2017 10:04 pm ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
Nice spot. Thanks. Classy people, go to void CloseAllTradesBelongingToEA() and find ForceTradeClosure; replace it with WholePositionForceTradeClosure. It will be around about line 3823 depending on how many of the updates you have been superbly crafting for yourselves. The offending line is: if (!result) ForceTradeClosure= true; and should be: if (!result) WholePositionForceTradeClosure = true; |
|
| Author: | eRIKb81 [ Wed Dec 06, 2017 10:27 am ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
The cashUPL calculation still counted all the trades from all the magic numbers. I moved the block@1728 for "//Whole position monitor if TradeWholePositionAsBasket is enabled" to after the "//All conditions passed, so carry on" block, like i tried yesterday. It worked, cashUPL display in Empty4 works now, it was higher than the profit target, only the right positions got closed. Profitable basket closed. EDIT: Ignore the sum at the end, that's just the daily balance. EDIT2: The Cash UPL display somehow is not working for every EA, moving the block back to it's original place and adding "if (OrderMagicNumber() != MagicNumber) continue;" worked better. |
|
| Author: | SteveHopwood [ Wed Dec 06, 2017 10:48 am ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
Thanks again Eric. The Peasants' fix is V 1l in post 1. Members of the Nobility, do a search for "//Whole position monitor if TradeWholePositionAsBasket is enabled" and copy this over the top of the code block: Code: Select all if (OrderMagicNumber() == MagicNumber || IgnoreMagicNumbers) if anybody wants this feature. |
|
| Author: | Barcode [ Thu Dec 14, 2017 3:48 am ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
Steve, What the chance of getting an option added to the EA that writes the reason for the trade closure to the TradeComment. At present I am never quite sure why the trade closed. This should be a big help for tuning the EA. Bob |
|
| Author: | renexxxx [ Thu Dec 14, 2017 4:31 am ] |
| Post subject: | HGB's Candle Power multi-pair combined trader and dashboard |
The chance for that is 0.0%. The TradeComment field is set at the time the trade is opened and it can not be altered through code. R. |
|
| All times are UTC | Page 8 of 10 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|