| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Holy Graily Bob's Candle Power https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=5272 |
Page 21 of 36 |
| Author: | tomele [ Mon Oct 09, 2017 9:10 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
Hi. The immediate close might have to do with SsCloseTradesOnColourChange. Line 2254 should be: if (SsColour == blue) EDIT: CP is still closing trades. There must be something else. |
|
| Author: | tomele [ Mon Oct 09, 2017 9:50 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
Hi. Found another reason for closing: MaTrend is an empty string at that moment. Change line 2205 to: if (MaTrend == down) and line 2260 to: if (MaTrend == up) EDIT: Although this works, the correct solution is to add "if (UseBobMoving Average) to both blocks. So the both blocks should be Code: Select all |
|
| Author: | SteveHopwood [ Mon Oct 09, 2017 10:14 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
Thanks Thomas. The fix is already in post 1. Thomas led me to the bloop in one of his previous posts. The problem was me forgetting to add a check to the moving average closure block that were are using Bob's moving average. V 1a for the hoi polloi is in post 1. For the classy people here, easiest is simply to copy the entire function over the top of the existing one: Code: Select all For buy trades: if (MaTrend == down) For sell trades: if (MaTrend == up) Thanks Thomas. You saved me some brain pain this morning. |
|
| Author: | Barcode [ Mon Oct 09, 2017 10:59 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
Thanks Thomas / Steve. Looking much better. Bob |
|
| Author: | SteveHopwood [ Mon Oct 09, 2017 2:53 pm ] |
| Post subject: | Holy Graily Bob's Candle Power |
Ehu-style dashboard ea for CP and found a bloop in the Peaky code. Classy people, do a search for "int Highest = iHigh(symbol, tf, bars);" You will see these two lines of code: int Highest = iHigh(symbol, tf, bars); int Lowest = iLow(symbol, tf, bars); They should be: int Highest = iHighest(symbol, tf, bars); int Lowest = iLowest(symbol, tf, bars); iHigh() returns the high price of the selected candle. iHighest() returns the the shift of the bar with the highest price - this is what we need here. Update for the peasants in post 1 - still V 1a. |
|
| Author: | SteveHopwood [ Mon Oct 09, 2017 5:42 pm ] |
| Post subject: | Holy Graily Bob's Candle Power |
I still hadn't quite got those Peaky calls quite right - I left out the mode, which can be to the high or low or open or close prices. Classy people, the code should read: int Highest = iHighest(symbol, tf, MODE_HIGH, bars); int Lowest = iLowest(symbol, tf, MODE_LOW, bars); Codaly challlenged peasants, the fix is in post 1. |
|
| Author: | wallywonka [ Tue Oct 10, 2017 12:56 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
Seems to be a bug if you remove the HGI direction filter it will take Short/Long trades and wont look at the other filters SS/Peaky etc |
|
| Author: | xphoton [ Tue Oct 10, 2017 1:41 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
You can comment line 1951~1958 for quick fix. They will be judged after. The Reserved code has not finished. Code: Select all |
|
| Author: | wallywonka [ Tue Oct 10, 2017 6:09 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
That did the trick! |
|
| Author: | SteveHopwood [ Tue Oct 10, 2017 9:05 am ] |
| Post subject: | Holy Graily Bob's Candle Power |
Nice spot xphoton. Thanks. Most of us have not noticed this because we are using HGI. Classy people, you know what to do. No need to comment it out; just delete it. Slightly unkempt people, your fix is in post 1. |
|
| All times are UTC | Page 21 of 36 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|