| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| MPTM updated https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5190 |
Page 7 of 13 |
| Author: | SteveHopwood [ Fri Oct 16, 2020 2:59 pm ] |
| Post subject: | MPTM updated |
You probably guessed that I forgot all about this. The Close_Lots calculation is not needed twice but would make no difference as it will result in the same value. Delete the second calculation. I will manage some trades next week and see if I can work out what is wrong. |
|
| Author: | K-Lander [ Mon Nov 16, 2020 2:48 pm ] |
| Post subject: | Minor bug on MPTM |
Hi folks, Just found a small bug on MPTM´s InsertTakeProfit function (line 1732). When calculating the TP, it does so from current price instead of the order´s open price. The needed changes are as follows: Line # ..... Replace... ....... With... 1753........ ask............ OrderOpenPrice() 1762........ bid............ OrderOpenPrice() Credit goes to laziness, as I couldn´t be bothered to manually placing the SL and TP to some pending orders, which led to finding the glitch. I am not attaching the amended EA as it would not be an authentic, certified, made-in-Hopwoodshire version of the thing. My very small $0.02. Cheers, |
|
| Author: | SteveHopwood [ Mon Nov 16, 2020 4:19 pm ] |
| Post subject: | Minor bug on MPTM |
Not sure what you are looking at; the code is correct in my version and in the post 1 version. Are you sure yours is up to date? |
|
| Author: | K-Lander [ Mon Nov 16, 2020 4:27 pm ] |
| Post subject: | Minor bug on MPTM |
Seems I have an old version of MPTM and the bug seems to have been fixed in the updated one. My bad, sorry. Have a nice weekend K |
|
| Author: | Fourxxxx [ Tue Nov 24, 2020 1:54 am ] |
| Post subject: | MPTM updated |
I seem to be missing something trying to get MPTM to close trades using HGI Blue Wavy lines. I have the latest HGI Indicators and library files (fresh download) installed and HGI is displaying on the charts. MPTM will close trades if I set take profit in Pips but I would like it to close trades when the Blue Wavy lines are displayed. I have tried everything but I am running out of hair to pull out very fast. |
|
| Author: | SteveHopwood [ Tue Nov 24, 2020 1:51 pm ] |
| Post subject: | MPTM updated |
You will be sort of glad to know that the fault was in the coding, not in your attempts to use mptm. Fixed in 1c in post 1. Coders and most DIYers will understand the bloop immediately. Go to the bool UsingHgiToCloseTrade(int ticket) function and scroll down to: //The HGI library functionality was added by tomele. Many thanks Thomas. These two lines need editing: signal = getHGISignal(Symbol(), HgiTimeFrameC, shift);//This library function looks for arrows. slope = getHGISlope (Symbol(), HgiTimeFrameC, shift);//This library function looks for wavy lines. Change the highlighted words to these: signal = getHGISignal(OrderSymbol(), HgiTimeFrameC, shift);//This library function looks for arrows. slope = getHGISlope (OrderSymbol(), HgiTimeFrameC, shift);//This library function looks for wavy lines. FYI folks, in looking for the fault I noticed how similar the hgi closure input names were to the hgi hedging input names, so I changed them. It should not affect the running of mptm if you leave yours as they are. |
|
| Author: | Fourxxxx [ Wed Nov 25, 2020 2:03 am ] |
| Post subject: | MPTM updated |
Thank you if (slope == RANGEABOVE && HgiCloseOnYellowWavyC) and if (slope==RANGEBELOW && HgiCloseOnYellowWavyC) R Code: Select all |
|
| Author: | SteveHopwood [ Wed Nov 25, 2020 10:53 am ] |
| Post subject: | MPTM updated |
Thanks for a really helpful contribution. I have added a slightly different solution to Fourxxxx's, so the easiest DIY is to copy the entire function over the top of the existing one: Code: Select all |
|
| Author: | Fourxxxx [ Mon Dec 14, 2020 3:42 am ] |
| Post subject: | MPTM updated |
Thank you for the fixes so far, is it possible to have the option to close all Pending Orders for the same pair when an indicator close is triggered, please? |
|
| Author: | SteveHopwood [ Mon Dec 14, 2020 7:39 pm ] |
| Post subject: | MPTM updated |
You are talking about the likes of SS and HGI as included with MPTM? |
|
| All times are UTC | Page 7 of 13 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|