Re: HTF fix thread: discussion, testing WTF beta series

thank you.

Re: HTF fix thread: discussion, testing WTF beta series

No news is good news -- it's been 2 weeks since last post, so sounds like these indicators work ok. Thanks everyone for your help. Feel free to consider them "not beta".

Re: HTF fix thread: discussion, testing WTF beta series

KROG

I have not had the opportunity to experiment with your group of indicators so far as I am involved in something else.

I want to thank you for the efforts you are putting into this project. You are helping a huge group of people and I know they appreciate your contributions.

daveM

My 'secret' goal is to push EA Studio until I can net 3000 pips per day....

Re: HTF fix thread: discussion, testing WTF beta series

I tried converting Awesome Oscillator to WTF, but ran into problems, firstly to solve these problems and secondly to encourage other users to experiment with WTF also, I'm giving a detailed overview what I did and what's wrong obviously.

For code examples I used AccOsc beta 2 and Stoch beta 1 and 2.

What I added:

Line 65: straightforward copy&paste of IndParam.ListParam[4] to Combobox parameters (I left it a 4 as I think it doesn't really matter whether it's 3 or 4);

Line 101: copy&paste of the checkbox parameters;

Line 125: copy&paste of "Convert to Higher Timeframe";

Line 149: activated err2 as base price is settable;

Line 165: copy&paste of "Convert to Higher Timeframe", I made it to look like in AccOsc, that means only one double value (hadAO), in calculation there are 3 of those, but as only one is used in signal calculation I hence thought only that one is needed to be converted to WTF; I put "h" before ad's as in examples;

Line 267:  copy&paste of "replace small values...", modified the "ad" things, and OscillatorLogic also, then copy&pasted some more of "expand component array...";

*Line 380: copy&paste of string Tostring stuff, it gave me an error, my modifications didn't fix the thing, so I deleted it in Big-Cojones-style, and voila! no errors!

Line 384: copy&paste of some HTF stuff, a lot of code, no mods from me.

Problems: readings are way off, colours don't match, actually it even repaints when scrolling.

Post's attachments

AweOccMTF.cs 25.21 kb, 50 downloads since 2011-04-25 

You don't have the permssions to download the attachments of this post.

Re: HTF fix thread: discussion, testing WTF beta series

Blaiserboy wrote:

KROG

I have not had the opportunity to experiment with your group of indicators so far as I am involved in something else.

I want to thank you for the efforts you are putting into this project. You are helping a huge group of people and I know they appreciate your contributions.

daveM

No problem, feel free to advise any problems anytime -- I just wanted to make a note for myself about these. Usually, I get distracted, go on to something else, forget what I was working on, and then in the future I can't tell if I finished it or left it with more work to be done.

Re: HTF fix thread: discussion, testing WTF beta series

footon --

I think it's lines 156 and 157, yours:

            double[] adMASlow = MovingAverage(nSlow, 0, maMethod, Price(basePrice));
            double[] adMAFast = MovingAverage(nFast, 0, maMethod, Price(basePrice));

Price(basePrice) is the lower time frame prices. Try replacing with hfPrice:

            double[] adMASlow = MovingAverage(nSlow, 0, maMethod, hfPrice);
            double[] adMAFast = MovingAverage(nFast, 0, maMethod, hfPrice);

and line 160, yours:

            for (int iBar = nSlow - 1; iBar < Bars; iBar++)

Bars is the total number of lower time frame bars; it should be hBars, for the total number of higher time frame bars:

            for (int iBar = nSlow - 1; iBar < hBars; iBar++)

hfPrice is the higher time frame data series, created in line 149 from int err2:

int err2 = HigherBasePrice(basePrice, hBars, hfHigh, hfLow, hfOpen, hfClose, out hfPrice);

Sorry about that, I tried to add comments around the big WTF blocks so it would be easy to copy and paste to any indicator; for these lines I could not do it because it's not the same in every indicator.

Post's attachments

AweOccMTF_1.cs 25.18 kb, 52 downloads since 2011-04-25 

You don't have the permssions to download the attachments of this post.

Re: HTF fix thread: discussion, testing WTF beta series

Thanks, Krog! It works now, so easy mistake to mend, kind of funny actually, because yesterday I thought about it, and I came to a conclusion that the fault must be in calculation, but after that I doze off and didn't follow it up.

One thing though, when I zoom in the chart, it repaints the colour of one WTF bar, the value stays correct. Oh and the ToString, line 380, other indis have something like this:

"WTF=" + IndParam.ListParam[4].Text + ")";  // WTF period

If I try to put it in, it gives me an error, as far as my understanding goes, it doesn't seem to have a significant importance, am I correct on this?

All in all, great job in deciphering my overwhelmingly long overview (hopefully someone finds it helpful, like an odd manual from non-coder to non-coder big_smile ) and nailing the problem!

Re: HTF fix thread: discussion, testing WTF beta series

Glad that took care of the problem, happy to help.

"WTF=" + IndParam.ListParam[4].Text + ")";  // WTF period

That gets the text from the drop down and puts it on the chart for you. So on the chart you would see:
"aMTFAwesomeOscillator(Simple,Median,34,5,WTF=1 hour)"
because I always forget what parameters I have when I'm looking at the chart.

If you get an error, perhaps try verifying the line above it ends with:  + "," +
Most likely error is somewhere the open " and end " are not matching up correctly.

34 (edited by krog 2011-08-30 20:31:34)

Re: HTF fix thread: discussion, testing WTF beta series

Parabolic SAR WTF beta 2 -- adding this one, as yet untested. If you find unexpected behavior or bugs, please advise. It may redraw when used in FST, not sure yet. If it redraws, please advise.
thanks

EDIT >> removed old beta version, please get latest version from sticky thread

Re: HTF fix thread: discussion, testing WTF beta series

An old friend is visiting me while generating: index outside the bounds of array, WTF Moving Average.

Re: HTF fix thread: discussion, testing WTF beta series

footon wrote:

An old friend is visiting me while generating: index outside the bounds of array, WTF Moving Average.

I'm taking a a look at this, very difficult bug, so far I only reproduce in the Generator, but cannot reproduce in a strategy. Somehow, first bar is not being sent correctly from the indicator to the Generator, instead "0" is being sent.

Re: HTF fix thread: discussion, testing WTF beta series

This might not be the WTF indicator. I am able to get an error from the Generator from Moving Average (normal) -- ban all indicators except Moving Average for opening and closing and Generate. It seems if the MA is in both the open and close slot, Generator alerts an error. However, the error appears more frequently with the WTF version. I'll have to more testing to be sure the MA normal error is the same as the MA WTF error.

I think a workaround for now would be sure MA WTF is not in both Opening and Closing Point of the Position, or at least it seems to make it less frequent.

Re: HTF fix thread: discussion, testing WTF beta series

That's interesting, I had closing point locked (indi was stop limit) everytime I got the error, and I also noticed that it popped up very frequently.

39 (edited by krog 2011-08-30 20:32:30)

Re: HTF fix thread: discussion, testing WTF beta series

My mistake -- it was a bug in MA WTF when used as Open or Close slot. Try this version, should be fixed.


EDIT >> removed old beta version, please get latest version from sticky thread

Re: HTF fix thread: discussion, testing WTF beta series

I got an error on MA WTF beta1 :
"Error: Index was outside the bounds of the array.
There is an error when calculating the following indicator:
Moving Average (WTF beta 1)"