Hello All,
Looking for a bit of feedback on WR% lookback. 4hr TF.
I put together a little bit of code (it’s very basic) and while it does look back well enough, it’ll ‘print’ the very first flavour of OB/S that it finds w/in the lookback period rather than the last one it’s seen that meets the OB/S criteria. Has annoyed me, won’t lie, because it’s a good example of my own short comings and how I landed in the ‘oh that worked’ zone for a few weeks now and have been going WOT printing all and sundry to screen, not quite but you know the gist …. 🙂
OB = summation[LookBack4](Williams4h crosses over -20)
OS = summation[LookBack4](williams4h crosses over -80)
IF OS then
drawtext("OS",xstart-70,ystart-200,dialog,bold,14) coloured("Blue") anchor(topright,xshift,yshift)
elsif OB then
DRAWTEXT("OB",xstart-70,ystart-200,SansSerif,Bold,14)coloured("darkred")anchor(topright,xshift,yshift)
Ideally the code could live in an auto-trader as part of metric-build-up.
Roberto’s Cowabunga and Nonetheless’s template has been very good at steering the ship, so many thanks to both for the posts.
I also see a bit of indifference when using ‘or Williams4h > -20″ / ‘or Williams4h < -80’ along with the above statements – they have no effect to the print. For example when then we have an OB scenario on 4h and the following criteria is met:
= summation[LookBack4](Williams4h crosses over -20 or Williams4h > -20)
there’s nothing printed when we have Williams4h > -20 in there alone for example.
All this lives on 5min TF chart and is a good basis for getting it across the line first.
I guess what I was after was, that during the past periods (any), say 10 periods (on a WR% 4hr) and the conditions are met, we print the last condition met through that period. Printing the last two conditions would be great too but I’d take the last!
I’m using the following to clean up the remainder in the event conditions aren’t met. But if we could print the last two that could eliminate it maybe.
else
DRAWTEXT("WIP...",xstart-80,ystart-200,SansSerif,Bold,14)coloured(64,64,0)anchor(topright,xshift,yshift)
Many thanks,
inv