| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| All avereges_v2.5 within the shell code EA https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1101 |
Page 1 of 1 |
| Author: | Carioca [ Mon Nov 19, 2012 8:14 pm ] |
| Post subject: | All avereges_v2.5 within the shell code EA |
Sorry for the english As I would put the code of the indicator AllAverages_v2.5, in a shell EA code, without having to to use iCustom as slope. I tried more without success so far thanks |
|
| Author: | Carioca [ Fri Nov 23, 2012 4:10 pm ] |
| Post subject: | Re: All avereges_v2.5 within the shell code EA |
someone help I think it would be something like this in the EA code. More logical example that does not work. Code: Select all HMA = HMA (????, 14, 1); HMAPREV = HMA (????, 14, 2); if (HMA> HMAPREV) SendLong = false; if (HMA <HMAPREV) SendShort = false; |
|
| Author: | Carioca [ Tue Nov 27, 2012 2:10 pm ] |
| Post subject: | Re: All avereges_v2.5 within the shell code EA |
Does there exist one, very generous programmer that can help me? |
|
| Author: | garyfritz [ Thu Nov 29, 2012 12:35 am ] |
| Post subject: | Re: All avereges_v2.5 within the shell code EA |
Carioca, it looks like you just pass it the array that you want to smooth. So for example say you copy the last 100 bars' Close value to myClose[]: (this is untested but it should be close) Code: Select all Notice that myClose[] and myHMT[] are REVERSED from the "normal" Close/etc order -- myClose[0] is 100 bars ago, myClose[99] is the newest (current) bar. The AllAverages functions don't operate on "normal" (0 is the current bar) array orders. That's confusing if you're used to thinking of "0 is the current bar" logic. But that's the way arrays usually work. It has the advantage that the index for a particular candle never changes. With "normal" Empty4 behavior, 0 is the newest, and when a new candle arrives the candle that used to be 0 is now 1, etc. But with the "reversed" array order, myClose[99] still refers to the same candle. You just have to ArrayResize() myClose[] and myHMA[] when a new candle arrives, so you've got a spot to stick the new candle's data. Gary |
|
| Author: | Carioca [ Thu Nov 29, 2012 2:01 am ] |
| Post subject: | Re: All avereges_v2.5 within the shell code EA |
Thanks Gary by answering me. I tried the more I'm a lousy also coder, what I did wrong he returned the value 0. Code: Select all |
|
| Author: | garyfritz [ Thu Nov 29, 2012 2:27 am ] |
| Post subject: | Re: All avereges_v2.5 within the shell code EA |
Silly question, but: did you ever call ReadIndicatorValues() ?? I don't know what value of idx you used in your display message, so I don't know why it returned 0. I dropped your code into an indicator and it worked fine: Code: Select all |
|
| Author: | Carioca [ Thu Nov 29, 2012 3:11 am ] |
| Post subject: | Re: All avereges_v2.5 within the shell code EA |
I know, Newbie question well it works perfectly. More for some reason returns value 0. thanks gary |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|