| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Reading an indicator to use in an EA https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1038 |
Page 1 of 1 |
| Author: | Dewey McG [ Sun Nov 18, 2012 12:14 am ] |
| Post subject: | Reading an indicator to use in an EA |
I am just learning to code and have a long ways to go. I do know how to do backtesting and optimization to see if a strategy is worth pursuing further though. Right now I am trying to design a few simple EA's to test out some ideas I have. I am stuck on something that is probably basic for everyone else. I have attached an RSI divergence indicator. All I am trying to do is be able to read the output of the indicator into the EA to tell it whether or not there is divergence, bullish or bearish. If I put the indicator on the chart I can see the arrows of course, but I don't see what value to look for or what value indicates the divergence is there. The data window shows Values 2, 3 and 4. It's probably something as simple as when a certain value is over a certain number it is bullish and below a certain number it is bearish, but I don't understand the code in the indicator to know what to look for. Can someone tell me what I am looking for? If you have a better divergence indicator let me know. Thanks |
|
| Author: | gaheitman [ Sun Nov 18, 2012 12:27 am ] |
| Post subject: | Re: Reading an indicator to use in an EA |
It looks like you need to look at the named value for Bullish Divergence (mode 0 in iCustom) and Value 2 (mode 1) for Bearish. It also identifies the divergence two bars in the past, so you will never see it update bar 0. When you check iCustom(), you need to shift two bars in the past to see if there is a trigger. George |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|