WR% Lookback on 4hr TF printing last condition met.
Forums › ProRealTime English forum › ProBuilder support › WR% Lookback on 4hr TF printing last condition met.
- This topic has 21 replies, 3 voices, and was last updated 6 months ago by inverse.
-
-
05/31/2024 at 4:41 AM #233317
@robertogozzi that bit of code above you posted works with what I was reasoning, sorry for not getting back sooner on it.
Yes the left-most and greater number works well and I can print this too (as well as drawtext it).
When on WR I could also ‘add’ two variables for a total that married with the print to screen, it always looked short by 1 or 2 from memory and I assumed that it was and exclusive count. Given the print to screen marries with the underlying code, it’d make sense perhaps that what I saw was just a knockon of ‘incorrect’ maths. I did think though that when I printed the individual variables and added them it all married.
I just gave it a go and it’s off by two everywhere. You’re LLX=max(LastCO,LastCU) is all good. Thanks for the correction.
Can we use what is contained w/in LLX or the other variables as a lookback for summation?
This would allow for a bit of elasticity or what the old RF guys would call AGC-like action (automatic gain control).
Sorry for being a bit indirect with this I have a family member who has health challenges and my time’s been otherwise spent.
@JS appreciate the horse to water effort and your initial post was on point in allowing me to get to a situation where I might be able go a bit more granular – problem? is the more I do the more I want to do! I’m going through quite a bit of online content atmo (as much as time permits) but time is getting the better of me, no excuses, just life.06/01/2024 at 10:48 AM #233369LLX3Integer = round(LLX3Value) useful in getting some of it done, still a wip….slow going on lower tf., will see how it goes.
1 user thanked author for this post.
06/05/2024 at 3:07 AM #233502Hi Rob,
Could be a bit of a bug or me but when when I apply a WR% as coded by Nicolas in 2016 (way back …. ) (as an indicator) to a 1hr TF there’s nothing displayed on the scale re: current wr levels.
The vanilla WR% as included w/in PRT works on 1hr but the one from 2016 won’t work as expected on 1hr TF.
12345678//PRC_WilliamsRpercent - 01.09.2016 - Nicolas @ www.prorealcode.comperiod = 14hh = highest[period](close)ll = lowest[period](close)Wp = ((hh-close)/(hh-ll))*-100return Wp as "Williams R percent", -20 as "-20 level", -80 as "-80 level"Appreciate some feedback from you and / or the comm. on whether this a user error or a bug of some kind, perhaps also whether there’s a workaround. Code like – williams crosses under -80 – within a print to screen / draw text has false triggered and it looks to maybe be related to what’s seen above, so when paired with another metric, cci, macd etc, prints/drawings either leverage those states or whatever the WR previous state was.
@JS you did say it was tricky ….Cheers,
inv
06/05/2024 at 3:36 AM #233503Printing to screen will return a ‘zero’, as in ‘0’ at times for williams 1hour metric and can result in an outlier condition (or not even). It’s a level (0) but I’ve not compared it to other TF to see whether there’s anything to it, the other TF are ok and levels seen in scale. This is seen across all indexes I looked at, both in APAC and EU. It could be a transitory state etc which delivers what I’m calling outliers for now which means things aren’t nailed down enough and continues to be a wip for me which is ok but thought wiser minds could look it over and confirm whether it’s a me thing or seen more broadly – this is on PRT Complete supplied by IG.
06/05/2024 at 5:08 AM #233504Apologies this is what I have running on a 1hr chart and elsewhere.
WR % 1hr1234period1h = 14hh1h = highest[period1h](high)ll1h = lowest[period1h](low)williams1h = ((hh1h-close)/(hh1h-ll1h))*-100I think the ‘close’ crept in while testing, typical.
06/05/2024 at 8:46 AM #233516Apologies for the noise.
WRT the 1hr TF chart not printing WR values on scale during APAC, this looks to be resolved when we head into EU opens.
As far as printing to console goes there’s some lag present on williams1h wr1hr print vs wr1hr print on 1minTF, so while not apples for apples on the lag when printing to screen, it will manifest what I’m calling outliers – it all depends on expectations I guess and I am pleased with outcomes so far (by miles) I can’t get it out of my mind that as the trading day gets busier, fixes applied to scripts during the evening and busy sessions look less than impressive when APAC re-opens. Different market personalities.
I’ve noticed this before and it affects wr but could also hit other indictors as well. I thought at one point it was garbage in script so duplicated and cleaned one up eliminating all but the very necessary (remember I’m learning here, so garbage is a given) and come EU sessions or close to them, perhaps busier APAC, what’s lagged? has come good (again).
I thought I’d settled on a basic screen draw and it was working ‘well’ for a few weeks, possibly month. Since the prior weeks maintenance I felt that APAC just wasn’t right and GUI feedback and erroneous feedback had increased.
TBH it’s probably a me thing in some ways but my 1hr Australia 200 chart would not display WR levels on the scale today and the console prints diverged / lagged at times wildly. As the day progressed this resolved itself and the only change I made was to introduce a script duplicate that was sanitised.
Confused at times but not shattered.
I will say though, makes me think about how an auto-trader would fair through these periods, I’m sure I’ve been here before….the upshot is we’re mickey mouse again with what looks to be a normal working setup.
Really do like that we can o/p to console when investigating.
06/09/2024 at 1:57 AM #233648Just a bit of feedback on this. Packet loss over here is manifesting in all kinds of weirdness and looks to have resolved 6-7 June.
I’m sure no one notices because on the longer TF it marries well enough optically but because I’m in the process of evaluating the data and how it could be used maybe it’s showing up. Never mind, I thought that as no one else triggered it must have been a me thing. I’m keeping in mind that while evaluating from an auto-trader POV, things are run server-side but I’d like things to marry with what’s printed on scr initially before moving to a demo and using – I think it’s called – ‘graph on price’ to reflect how the system rolls. Not sure what graph on price reveals but hope to get there one day while manual trading alongside an auto-trader, just need to stay vertical.
1 user thanked author for this post.
-
AuthorPosts