Registered User Joined: 3/7/2010 Posts: 168
|
STOC2 .....is position in yesterdays rg. at current price ( adjustable )
so what would it be if i wanted it to be what it was at the open (adjustable)
if it can't be done (an adjustable) what would it be to make it "position in yesterdays rg. < 50% "
prefer it to be adjustable ...thx
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
STOC2 is the position of the close or current price within the most recent 2 bars (including the current bar).
A similar Indicator Formula for the open which includes the entire current range of the current bar can be written as follows.
100 * (O - MINL2) / (MAXH2 - MINL2)
If you only want to include what the range was at the start of the current bar, this could be written as follows.
100 * (O - L1 + ABS(O - L1)) / (H1 - L1 + ABS(O - H1) + ABS(O - L1))
That said, if you actually want where the open was relative only to the range of the previous bar, it could be written as follows.
100 * (O - L1) / (H1 - L1)
Note that all of the above formulas can return division by zero errors when the range being used in the denominator is negative.
Checking for the open being less than half of the range of yesterday can be written as follows.
2 * O < H1 + L1
Personal Criteria Formulas
Stochastic
Min Max PCFs
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/7/2010 Posts: 168
|
you said
"STOC2 is the position of the close or current price within the most recent 2 bars (including the current bar)."
and i say oh...i thought STOC2 was the position of the close or current price (not including current bar) ...so how do i get (not including current bar) i tried STOC2.1 but suprisingly thats not it ....thx
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
STOC2.1 is the 1 period simple moving average of STOC2. This ends up being exactly the same thing as STOC2.
STOC2.1.1 would be the position of the close of 1 bar ago within the range of the 2 bars ending 1 bar ago.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/7/2010 Posts: 168
|
well this is not what i want (after testing it) what i want is position of the range of yesterdays candle only not (within the most recent 2 bars ) at the close or current price of today...thx again
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
If I am understanding correctly, then you want the following.
STOC1.1.1
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/7/2010 Posts: 168
|
nope that not it either
let me try another way ...what i want is position of the close or current price within the range of yesterdays bar ( C1)
and could you explain what the numbers mean ...like (example stoc2.1.1 the first number 2 points to the candle the second number points to the candle it excludes ) so i might be better able to make the next one myself ...(if i get it) thx
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
What values are you expecting to see if the latest price is outside of the range of yesterday's bar?
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Please try the following Indicator Formula.
100 * (C - L1) / (H1 - L1)
Price and Volume
Full details of what each parameter does in the Personal Criteria Formula Language can be found on the following webpage.
Personal Criteria Formula Syntax
In STOC2.1.1 the 2 is the period of the raw stochastic, the first 1 is the period of a simple moving average of the raw stochastic used to generate the %K and the second 1 is the number of bars ago.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/7/2010 Posts: 168
|
ok now never mind all of the above ..but i think i have a way of explaining what i want that is more clear ...ok what i want position in 5 day range but the range counts back 5 days starting yesterday ( 5.1 ) but i want it to tell me what the position in 5.1 range is at todays close or current price ....i think the problem was that the range in the past has included todays candle as part of the 5 day range and that not what i want . i will show you in a video to help make it clear
https://youtu.be/zGh-AXCTmbE
https://youtu.be/zGh-AXCTmbE
|
|
Administration
Joined: 9/30/2004 Posts: 9,187
|
A picture is always worth a thousand words. Thanks for the video.
Try this....
(C - MINL5.1) / (MAXH5.1 - MINL5.1) * 100
|
|
Registered User Joined: 3/7/2010 Posts: 168
|
yep thats what i wanted ...but now can you replace the C for a SMA such as (avgc8)
and get position of avgc8 in 5.1 day range......i tried it numbers are not right ...if this it ot the way to get it then what is the formula for that thank you
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
AVGC8 within its own 5 bar range ending ending 1 bar ago would be as follows.
100 * (AVGC8 - MIN(AVGC8.1,5)) / (MAX(AVGC8.1,5) - MIN(AVGC8.1,5))
AVGC8 within the 5 bar range of prices ending 1 bar ago would be as follows.
100 * (AVGC8 - MINL5.1) / (MAXH5.1 - MINL5.1)
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 3/7/2010 Posts: 168
|
hi bruce
this is todays price in relation to its position in 5.1 day range formula (C - MINL5.1) / (MAXH5.1 - MINL5.1) * 100
so with that said can you get position in two date points instead of MINL5 - MAXH5 replace the MINL5 and MAXH5 with dates ...if you can't do it that way with that formula is there another way to formulate position in range using two dates
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
There really isn't a way you do this by specifiying just two dates.
You can specify the last bar in the date range by replacing the bars ago parameter. So for example, you could use the five trading days ending on February 1, 2016 as follows.
(C - MINL5.'02/01/2016') / (MAXH5.'02/01/2016' - MINL5.'02/01/2016') * 100
But there is no way to specify the starting date other than using the current number of bars in the formula.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/23/2013 Posts: 245
|
Bruce this is unrelated but very similar, i am using the first formula and its result will sometimes reach 100 and Max out there, but trying to write the formula different and get the same results but cant quite get there. Here are the 2 formulas, the later is 1 of my attempts to rewrite different but does not produce the same exact results
100 * (C-MIN(C,8)) /( MAX(C,8) -MIN(C,8))
100 * (C - MINL8) / (MAXH8 - MINL8)
Thanks
|
|
Registered User Joined: 8/23/2013 Posts: 245
|
I guess is am not getting the difference in MIN(C,8) and MINL8
|
|
Registered User Joined: 8/23/2013 Posts: 245
|
OK I HAVE THIS
(100 * (C-MINC8) /( MAXC8 -MINC8) )
That said, this what i want to know if we can Calculate. IF I have the value of the Previous Bar Can I calculate the Value of the Price (C) that would create a Current Indicator Value of 100 or 0 for the Above Indicator using 3 Period, 6 Period, and 8 Period. The Following 3 Formulas are formulas for the Previous Bar Value:
100 * (C1-MINC3.1) /( MAXC3.1 -MINC3.1)
100 * (C1-MINC6.1) /( MAXC6.1 -MINC6.1)
100 * (C1-MINC8.1) /( MAXC8.1 -MINC8.1)
Thanks
|
|
Registered User Joined: 1/28/2005 Posts: 6,049
|
The first measures the close based on the close range.
The second measures the close based on the high low range.
Thanks
diceman
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Assuming you want to use your formulas based on the close instead of basing the formulas on the entire range then the 3 period version will be 100 when:
C >= MAXC2.1
And 0 when:
C <= MINC2.1
The same basic format will work for the 6 period version. 100 when:
C >= MAXC5.1
And 0 when:
C <= MINC5.1
And for the 8 period version. 100 when:
C >= MAXC7.1
And 0 when:
C <= MINC7.1
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Registered User Joined: 8/23/2013 Posts: 245
|
so for the 8 period, the Price would be the MAXC7.1
|
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
Price would need to be at or above MAXC7.1 in order for your stochastic based entirely on closing prices to be 100.
More strictly though price needs to be at or MAXC7.1 and above MINC7.1. The reason for this is if all eight closing prices are the same, you would get a division by zero error. With a normal stochastic, this would be resolved by arbitrarily assigning the stochastic a value of 50.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|
|
Guest-1 |