| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| More help Please https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1261 |
Page 1 of 1 |
| Author: | s01 [ Sun Dec 02, 2012 11:16 pm ] |
| Post subject: | More help Please |
EDIT-2 OK, since my last post I have sucessfully modded about 5 indicators, but I am having problems with about 5 others. So I am getting better, slowly but surely. SHI_Channel indicator, Done!! Slope Direction indicator, Done!! Awaiting an answer before I go try to fix a few more, before I post them up.. Thanks George!! Code: Select all |
|
| Author: | SteveHopwood [ Sun Dec 02, 2012 11:35 pm ] |
| Post subject: | Re: More help Please |
You can always edit your thread and so post whatever you want in post 1, then add a 'latest update to xxxxx in post 1' post. This is how I do it. |
|
| Author: | Carioca [ Sun Dec 02, 2012 11:41 pm ] |
| Post subject: | Re: More help Please |
Enters the site forexmt4.com I think I should have a many versions of this indicator. Carioca |
|
| Author: | gaheitman [ Mon Dec 03, 2012 12:00 am ] |
| Post subject: | Re: More help Please |
To fix your initial test: Code: Select all Code: Select all I didn't run the code, but reading through it I'm guessing since it is going backwards through the bars, the UpDown you were using wasn't the most recent. George |
|
| Author: | s01 [ Mon Dec 03, 2012 8:02 am ] |
| Post subject: | Re: More help Please |
Thanks Geroge, that did the trick! And going back I was able to fix another with that little tidbit of information. So I have edited the 1st post with the next little indicator its a Slope Direction indicator, and I have it displaying the lines on the chart now, just the text is missing. This one might help me with a few others since it displays values in the data window when working correctly. And thats a problem I'm having with a couple of others. So this fix might set me up to fix a few more. Again I have ///'d out and comented in the indicator where the problems are .... Thanks again, Steve |
|
| Author: | gaheitman [ Mon Dec 03, 2012 9:35 am ] |
| Post subject: | Re: More help Please |
A couple of points. The value of x in your test section is always -1, since that is what causes it to drop out of the earlier loop. Generally, it's a bad idea to use the variable that drives a for loop outside of the for loop since its value is more of a side-effect of the loop processing and wasn't explicitly set. What you really want is the last value (value 0) of the array. Also, the values are either 1 or -1, not 1 or 2, so your code should be: Code: Select all George |
|
| Author: | s01 [ Mon Dec 03, 2012 10:09 am ] |
| Post subject: | Re: More help Please |
And that did the trick, it now works as it should ... and I understand why UP & DN do not have to be deleted ... filed away in my notes. Question: I'm a bit confused now, the values that are displayed on the lines on screen mean nothing then, how do you decide how to find the values if there are more than 3 or 6? Is it a progressive thing were the first two values since x is always -1 would be 1 & -1 the next would be 2 or -2? Steve |
|
| Author: | gaheitman [ Mon Dec 03, 2012 10:38 am ] |
| Post subject: | Re: More help Please |
In this particular indicator, there are 5 buffers being used. Three are being handled "naturally" and 2 are done with normal arrays that are modified to look like series arrays via the ArraySetAsSeries() function. I'll try to walk through the buffer logic for this indicator. The properties section defines 2 buffers via the statement Code: Select all Later, in the init() function, we make the following calls: Code: Select all The two buffers Uptrend[] and Dntrend[] are really only displaying a single line. We use two buffers because we want to display them in the appropriate color depending on whether it is in an up trend or a down trend. Metrader isn't smart enough to allow us to switch colors on the fly. In start(), we have the following code to create two additional buffers for our calculations: Code: Select all Next, we have three loops. The first prefills our vect[] array: Code: Select all Code: Select all Code: Select all George |
|
| Author: | s01 [ Mon Dec 03, 2012 2:12 pm ] |
| Post subject: | Re: More help Please |
OK, got that indicator printed out and that stuff highlighted, along with your notes ... gonna go take a crack at a harder one. Thanks again, George I'm sure I'll be back .. lol |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|