| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Slopey Graeme: another pipEasy-inspired trend trading EA https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=223 |
Page 8 of 14 |
| Author: | SteveHopwood [ Fri Jan 20, 2012 8:05 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Nope. Sorry. Never get it here and never have done, so nothing I can do. |
|
| Author: | SteveHopwood [ Sun Jan 22, 2012 7:25 pm ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Latest update in post 1. I have added code to the Rsi trend detection that ensures Rsi is travelling in the right direction as well as being outside the 45-55 band. The relevant input is RsiLookbackCandles, which tells the bot how many RsiTdTf candles to look back for the comparison. I have also added a Caterpillar trailing stop, but this is experimental and probably buggy. Here is what is supposed to happen:
|
|
| Author: | alex_forex [ Sun Jan 22, 2012 9:35 pm ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Nice update Steve, thanks Will update tomorrow on my actual demo. Regards Alex |
|
| Author: | MichaelM [ Mon Jan 23, 2012 4:28 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Hi Steve, Been playing around with the Risk based lot size code. I've got it working for G so that the lot size is always divisible by 2: Add the following external variable: Code: Select all i.e. HasBuyFilled() Code: Select all Code: Select all Code: Select all Code: Select all |
|
| Author: | SteveHopwood [ Tue Jan 24, 2012 12:10 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Fantastic Michael. Many thanks. I shall add all this tomorrow. Cheers |
|
| Author: | MichaelM [ Tue Jan 24, 2012 3:54 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
No worries. I also found an issue that's somehow related to the crappiness of Empty4. This code here inside init(): Code: Select all To see this for yourself, implement my Risk based lot size code mods above and use a RiskPercent > 0 Then open up the expert properties and press okay and repeat. You will notice each time you do this the *= multiplier; code will add an extra 0 say from, "Lot size based on 1000 points" (where 1000 points is the StopLoss variable hardcoded to 100 pips)... ...to instead making it say, "1000000 points" after you repeat the step three times. To get around this, you will need to modify that code as follows: Code: Select all |
|
| Author: | gaheitman [ Tue Jan 24, 2012 7:06 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Good catch. Yeah, the sequence of events after bringing up the Expert Properties is a bit of a mystery. Personally, I think it should do a complete restart of the application, but all it seems to do is allow you to modify the externs and then it runs deinit() followed by init(). It doesn't reset global variables to their initial values (as shown here) and doesn't reset static variables in any procedures. George |
|
| Author: | SteveHopwood [ Tue Jan 24, 2012 7:59 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Thanks again Michael. I am not going to do anything about this because it has never reared its head as a problem. Cheers |
|
| Author: | MichaelM [ Wed Jan 25, 2012 2:33 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
Hi Steve, Just noticed that this line will be affected by my risk based lot size code mod as it's directly referencing the variable "Lot" Code: Select all Code: Select all MichaelM |
|
| Author: | SteveHopwood [ Wed Jan 25, 2012 8:21 am ] |
| Post subject: | Re: Graeme: another pipEasy-inspired trend trading EA |
The problem here is that G has to know when half the trade has already been closed so he does not keep on closing half the existing position. I did not see half-closure working with risk-based lot sizes, but I do not like them and so do not use them. Yours is a simple but effective solution to this problem. I should have remembered that a half-close changes the comment. Nice one again. Cheers |
|
| All times are UTC | Page 8 of 14 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|