| stevehopwoodforex.com https://www.stevehopwoodforex.com/phpBB3/ Print view |
|
| Anyone got an idea how to work around this https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=1775 |
Page 1 of 1 |
| Author: | dietcoke [ Wed Apr 03, 2013 11:09 pm ] |
| Post subject: | Anyone got an idea how to work around this |
I am using a shifted Moving average on the weekly timeframe (2 wk LWMA as used in more than one of the NB versions) I am finding that my code is reading the wrong value for the average on some days of the week compared with the indicator displayed in the window. This seems to have something to do with the fact that the shift appears to run from Wednesday to wednesday rather than monday to monday. This code appears to be correct on Monday and tuesday Code: Select all Code: Select all Code: Select all |
|
| Author: | SteveHopwood [ Wed Apr 03, 2013 11:21 pm ] |
| Post subject: | Re: Anyone got an idea how to work around this |
I suddenly feel a lot better. Umpteen times I have torn my hair out wondering why the ma values displayed in my DisplayUserFeedback() are not the same as those shown on the chart. I thought I was doing something wrong. The fact that we are in the same boat does not help with a solution. It is just good to know that I (you) am not actually alone. Isn't Crapql4 such fun? Anyone here have a workaround solution like Gary's solution to the doubles thingy and CloseEnough()? The sort of solution that is included with every half-decent coding language ever written by a dense 14 year old but forgotten by those cowboys who wrote this crap? |
|
| Author: | eigenvector [ Fri Apr 05, 2013 3:21 am ] |
| Post subject: | Re: Anyone got an idea how to work around this |
I didn't see the iBarShift function being used. This is a must if you are referencing other timeframes or other symbols because the bar indexing does not match up. Basically this function returns the correct index for the timeframe you are attempting to reference. Try something like this: Code: Select all |
|
| Author: | lazypips [ Thu Apr 11, 2013 12:30 pm ] |
| Post subject: | Re: Anyone got an idea how to work around this |
Looks like GetMa is confused by the 7 days a week / the 5 trading days a week |
|
| All times are UTC | Page 1 of 1 |
|
Powered by phpBB® Forum Software © phpBB Limited |
|