Sorry to be a scab but....

BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Hello everyone,

I've been plugging away at this indi (ADR1), which I found over at FF ( :? ) all day trying to get it to operate as a channel.
I wanted to do this to use is manual backtesting of some of CJs principles in terms of for W/M/RRT formation at the 'edges'.
I managed to get the indi to draw a channel. And it seems to respond to current price action and stops redrawing after the range has exceeded selected ADR/ATR period.
However the values seem to be wrong as they don't quite match up with the original indi (for the current day at least anyway).
The thing I really like about the original is that it adapts the ADR based on previous/current days ADR. No other ADR channel I have seen does this.

So yeah, I hate to be a scab, but if someone could take a look at either my terrible hack job (veg2.mq4) or write it up from scratch (using ADR1.mq4) that would be great.
Anyway, here's the original and my bastardised version.
Cheers,
BobbyT
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Hello again,

There has been a couple of downloads and a number of views of the thread but no comments.
Is there anything I can do to help ypu help me?
Maybe I wasn't clear about what the problem is? Maybe veg2 could be cleaned up/commented a bit?
Anyways, let me know.
And thanks for your time
BobbyT
Procrastination provides exponentially negative returns - BobbyT
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Howdy,
OK so I commented up veg2 a bit to make things a bit clearer. I also inserted some block from the original indi which I can neither work out how to implement or have had to modify because I couldn't work out how to implement a certain part of code.
I've attached a couple of pictures to illustrate what the problem is.
Basically, the indi appears to be behaving as expected except that the range is too large (compared to the original indi).
Actually, on second thought, in some place (highlighted on the image) the boundaries appear to be running away from price. This shouldn't be happening.
If price is moving up, the upper boundary should stay put and the lower boundary should trail price. Vice versa when price is moving down.
Damn indis are tricky haha. It would be such a problem if this indi used buffers to start off with but it's and object based indi which really does suck (and is why it's no good for back testing in it's current form)

Anyway, hopefully this extra info will inspire some kind SHF folk to lend a hand on this one. It will be posted over in CJs forum when I've got it sorted for the benefit of all those here
Peace,
BobbyT

Edit: helps if I actually attach the indi :arrrg:
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Okay some updates are due before my brain falls out of my nose and I cease to be able to even have a beer :smile:

So I got a few things 'improved' on the indi.

It now stops running away from price and only moves in the direction of proce when price is moving away from it (ie pulling up the ADR as price eats it :good: )

However I noticed when I dropped it on a chart that some days in history it seems to do it's thing and other days it doesn't move at all (like the ADR was hit immediately as the day has started). Now that just doesn't seem right.

So I dropped it on a crappertester chart to see what it did....and...it surprised me. The whole darned thing repaints!? By the very nature of this indi, it should not repaint its past. The present day, sure. That's expected but not days that have completed. How can an ADR for past days change?

Which leads me to think two things:
1) That the indi uses ATR which may repaint some based on future values. This seems unlikley as it is only an ADR of 1 on D1. So once the day completes, this value shouldn't change right?

2)There is something out of sync in my loops and every time a new bar paints, each point on the lines gets a new value. The only solution I see to this is to use IndicatorCounted() to aviod recalculating the past :roll:
This seems like an obvious solution however I avoided using it as from what I understand IndicatorCounted counts left to right whilst bar indexing counts right to left. This (I think) has inherit problems in syncronizing IndicatatorCounted() with iADR.

ANyways, I'm making tortoise like progress and am still open to anyone to take a look at this ( in fact I'm almost begging :oops: ).
Attached below is the latest monstrosity to be birthed from my keyboard.
Take care,
BobbyT

Edit: I haven't managed to make any progress on the actual range itself yet. One of the more frustrating problems :uff:
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
Lowphat
Trader
Posts: 121
Joined: Fri Jun 27, 2014 12:20 am

Sorry to be a scab but....

Post by Lowphat »

this may be close or its as close as i have anyway.
You do not have the required permissions to view the files attached to this post.
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Thanks lowphat,
I'm a tad incapacitated at the moment (trying to forget about the day that has past).
I'll check it out in morning amd let you knpw how I go.
Cheers,
BobbyT
Procrastination provides exponentially negative returns - BobbyT
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Had a look, there's a lot of info in that indicator, not really what I'm trying to do with this little project though.
Thanks for the suggestion nonetheless. :good:

So I made a few changes this morning after having a bath-tub moment ala Steve Hopwood :smile:

I realised the redrawing I was seeing was due to the indi being out of sync with iATR. This is because I was using the indis count as the shift on the D1 iATR without correcting for the difference in timeframes. Not a very bright thing to do :lol:

So I've been running it in crappertester for a little bit watching how it behaves and the past no longer repaints. :yahoo:

However there still appear to be some glitches. If you take a look at the image below there are large spikes in the history (and I saw one of these paint in crappergytester this morning). I have no idea what would be causing such an issue but they exist on real and testing charts?

Also, the range, whilst now no longer way too large it seems to be consistently, 3-7 pips shorter on both sides :arrrg:
Stranger still I think the range issue is cumulative. It seems to be ok for the first couple of days in the tester but then the range starts to miscalculate.

So if anyone is following this fiasco, this is where I'm up to. I've attached the indi with minor updates and some images to show where I'm at.

I'm still very, very open to some coders eyeballs taking a look at this.

Cheers,
BobbyT
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Sorted out the spikes. Simple copy-paste error.
There still seems to be some problems with the way the history is painted though. I think it's to do with storing if the ADR for that day has been reached or not.

Slowly getting there. Who knows I might have this ready for some backtesting next weekend haha :smile:
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
BobbyT
Trader
Posts: 232
Joined: Thu Aug 21, 2014 1:34 am
Location: Seattle

Sorry to be a scab but....

Post by BobbyT »

Success!! :!!:
It seems to be working now.
Final working version (I hope) is attached.

This is best used on M15/H1 for visual backtesting purposes. I'm not sure it will be much good for live trading though may come in handy knowing where previous ADR limits were.

I will let it run live next week and drop another copy on some charts over the weekend to see how accurate in terms of painting the past.

Hopefully someone finds a use for it :hi:
You do not have the required permissions to view the files attached to this post.
Procrastination provides exponentially negative returns - BobbyT
Lowphat
Trader
Posts: 121
Joined: Fri Jun 27, 2014 12:20 am

average daily range

Post by Lowphat »

thx for sharing. looks good at a glance
Post Reply

Return to “Indicators”