Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

fib question Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dhirenshah
Posted : Thursday, June 28, 2018 12:48:28 PM
Registered User
Joined: 3/10/2012
Posts: 465

Hi Bruce 

I m trying to get price value output as 61.8%  between two most recent swings , is this correct way because its not giving me any price output value 

.618 * H13 * ABS(MAXH13 < H13 AND H13 > MAXH13.14) + .382 *  L13 * ABS(MINL13 > L13 AND L13 < MINL13.14)

and need the same for 0.382, 0.50 , 0.786, 0.886

 

thanks

Bruce_L
Posted : Thursday, June 28, 2018 1:44:26 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Where you have:

H13 * ABS(MAXH13 < H13 AND H13 > MAXH13.14)

You need to have something more like:

IIF(MAXH13 < H13 AND H13 > MAXH13.14, H13, IIF(MAXH13.1 < H14 AND H14 > MAXH13.15, H14, IIF(MAXH13.2 < H15 AND H15 > MAXH13.16, H15, IIF(MAXH13.3 < H16 AND H16 > MAXH13.17, H16, IIF(MAXH13.4 < H17 AND H17 > MAXH13.18, H17, IIF(MAXH13.5 < H18 AND H18 > MAXH13.19, H18, IIF(MAXH13.6 < H19 AND H19 > MAXH13.20, H19, IIF(MAXH13.7 < H20 AND H20 > MAXH13.21, H20, IIF(MAXH13.8 < H21 AND H21 > MAXH13.22, H21, IIF(MAXH13.9 < H22 AND H22 > MAXH13.23, H22, IIF(MAXH13.10 < H23 AND H23 > MAXH13.24, H23, IIF(MAXH13.11 < H24 AND H24 > MAXH13.25, H24, IIF(MAXH13.12 < H25 AND H25 > MAXH13.26, H25, IIF(MAXH13.13 < H26 AND H26 > MAXH13.27, H26, IIF(MAXH13.14 < H27 AND H27 > MAXH13.28, H27, IIF(MAXH13.15 < H28 AND H28 > MAXH13.29, H28, IIF(MAXH13.16 < H29 AND H29 > MAXH13.30, H29, IIF(MAXH13.17 < H30 AND H30 > MAXH13.31, H30, IIF(MAXH13.18 < H31 AND H31 > MAXH13.32, H31, IIF(MAXH13.19 < H32 AND H32 > MAXH13.33, H32, IIF(MAXH13.20 < H33 AND H33 > MAXH13.34, H33, IIF(MAXH13.21 < H34 AND H34 > MAXH13.35, H34, IIF(MAXH13.22 < H35 AND H35 > MAXH13.36, H35, IIF(MAXH13.23 < H36 AND H36 > MAXH13.37, H36, IIF(MAXH13.24 < H37 AND H37 > MAXH13.38, H37, IIF(MAXH13.25 < H38 AND H38 > MAXH13.39, H38, IIF(MAXH13.26 < H39 AND H39 > MAXH13.40, H39, IIF(MAXH13.27 < H40 AND H40 > MAXH13.41, H40, IIF(MAXH13.28 < H41 AND H41 > MAXH13.42, H41, IIF(MAXH13.29 < H42 AND H42 > MAXH13.43, H42, IIF(MAXH13.30 < H43 AND H43 > MAXH13.44, H43, IIF(MAXH13.31 < H44 AND H44 > MAXH13.45, H44, IIF(MAXH13.32 < H45 AND H45 > MAXH13.46, H45, IIF(MAXH13.33 < H46 AND H46 > MAXH13.47, H46, IIF(MAXH13.34 < H47 AND H47 > MAXH13.48, H47, IIF(MAXH13.35 < H48 AND H48 > MAXH13.49, H48, IIF(MAXH13.36 < H49 AND H49 > MAXH13.50, H49, IIF(MAXH13.37 < H50 AND H50 > MAXH13.51, H50, IIF(MAXH13.38 < H51 AND H51 > MAXH13.52, H51, IIF(MAXH13.39 < H52 AND H52 > MAXH13.53, H52, IIF(MAXH13.40 < H53 AND H53 > MAXH13.54, H53, IIF(MAXH13.41 < H54 AND H54 > MAXH13.55, H54, IIF(MAXH13.42 < H55 AND H55 > MAXH13.56, H55, IIF(MAXH13.43 < H56 AND H56 > MAXH13.57, H56, IIF(MAXH13.44 < H57 AND H57 > MAXH13.58, H57, IIF(MAXH13.45 < H58 AND H58 > MAXH13.59, H58, IIF(MAXH13.46 < H59 AND H59 > MAXH13.60, H59, IIF(MAXH13.47 < H60 AND H60 > MAXH13.61, H60, IIF(MAXH13.48 < H61 AND H61 > MAXH13.62, H61, IIF(MAXH13.49 < H62 AND H62 > MAXH13.63, H62, 1 / 0))))))))))))))))))))))))))))))))))))))))))))))))))

And where you have:

L13 * ABS(MINL13 > L13 AND L13 < MINL13.14)

You need to have something more like:

IIF(MINL13 > L13 AND L13 < MINL13.14, L13, IIF(MINL13.1 > L14 AND L14 < MINL13.15, L14, IIF(MINL13.2 > L15 AND L15 < MINL13.16, L15, IIF(MINL13.3 > L16 AND L16 < MINL13.17, L16, IIF(MINL13.4 > L17 AND L17 < MINL13.18, L17, IIF(MINL13.5 > L18 AND L18 < MINL13.19, L18, IIF(MINL13.6 > L19 AND L19 < MINL13.20, L19, IIF(MINL13.7 > L20 AND L20 < MINL13.21, L20, IIF(MINL13.8 > L21 AND L21 < MINL13.22, L21, IIF(MINL13.9 > L22 AND L22 < MINL13.23, L22, IIF(MINL13.10 > L23 AND L23 < MINL13.24, L23, IIF(MINL13.11 > L24 AND L24 < MINL13.25, L24, IIF(MINL13.12 > L25 AND L25 < MINL13.26, L25, IIF(MINL13.13 > L26 AND L26 < MINL13.27, L26, IIF(MINL13.14 > L27 AND L27 < MINL13.28, L27, IIF(MINL13.15 > L28 AND L28 < MINL13.29, L28, IIF(MINL13.16 > L29 AND L29 < MINL13.30, L29, IIF(MINL13.17 > L30 AND L30 < MINL13.31, L30, IIF(MINL13.18 > L31 AND L31 < MINL13.32, L31, IIF(MINL13.19 > L32 AND L32 < MINL13.33, L32, IIF(MINL13.20 > L33 AND L33 < MINL13.34, L33, IIF(MINL13.21 > L34 AND L34 < MINL13.35, L34, IIF(MINL13.22 > L35 AND L35 < MINL13.36, L35, IIF(MINL13.23 > L36 AND L36 < MINL13.37, L36, IIF(MINL13.24 > L37 AND L37 < MINL13.38, L37, IIF(MINL13.25 > L38 AND L38 < MINL13.39, L38, IIF(MINL13.26 > L39 AND L39 < MINL13.40, L39, IIF(MINL13.27 > L40 AND L40 < MINL13.41, L40, IIF(MINL13.28 > L41 AND L41 < MINL13.42, L41, IIF(MINL13.29 > L42 AND L42 < MINL13.43, L42, IIF(MINL13.30 > L43 AND L43 < MINL13.44, L43, IIF(MINL13.31 > L44 AND L44 < MINL13.45, L44, IIF(MINL13.32 > L45 AND L45 < MINL13.46, L45, IIF(MINL13.33 > L46 AND L46 < MINL13.47, L46, IIF(MINL13.34 > L47 AND L47 < MINL13.48, L47, IIF(MINL13.35 > L48 AND L48 < MINL13.49, L48, IIF(MINL13.36 > L49 AND L49 < MINL13.50, L49, IIF(MINL13.37 > L50 AND L50 < MINL13.51, L50, IIF(MINL13.38 > L51 AND L51 < MINL13.52, L51, IIF(MINL13.39 > L52 AND L52 < MINL13.53, L52, IIF(MINL13.40 > L53 AND L53 < MINL13.54, L53, IIF(MINL13.41 > L54 AND L54 < MINL13.55, L54, IIF(MINL13.42 > L55 AND L55 < MINL13.56, L55, IIF(MINL13.43 > L56 AND L56 < MINL13.57, L56, IIF(MINL13.44 > L57 AND L57 < MINL13.58, L57, IIF(MINL13.45 > L58 AND L58 < MINL13.59, L58, IIF(MINL13.46 > L59 AND L59 < MINL13.60, L59, IIF(MINL13.47 > L60 AND L60 < MINL13.61, L60, IIF(MINL13.48 > L61 AND L61 < MINL13.62, L61, IIF(MINL13.49 > L62 AND L62 < MINL13.63, L62, 1 / 0))))))))))))))))))))))))))))))))))))))))))))))))))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Thursday, June 28, 2018 3:06:44 PM
Registered User
Joined: 3/10/2012
Posts: 465

Oh Wow, Bruce  its never a small formuala with me  is it :)) haha 

It works perfect,, 

Also something for development team to ponder ... 

When as end user we making custom PCF  and it gives error message saying " FORMULA ERROR ON POSITION 52 OR 502 etc... instead can that messge be highlighted to the exact point where the error is happening within the formula when we click on test,,, because how would a USER know what is the position numbering 52 or 502 or whether we missing a / or ( ) . ,

Hope the develpoment team can add this in the newer versions... please

And one more request attached is the link https://www.dhirenshah.com/238-2/

I do this math manually and wondering if i can get formula on that... to KNOW WHERE IS THE CURRENT CLOSE RANGE after the math 

I only use the  math as taking highest high of 5 bars  and lowest low of 5 bars and the OPEN of the first candle and Close of the last Candle and getting the range of  most recent where price is trading using those candles swings...i use 

H2 * ABS(H < H2 AND H1 < H2 AND H2 > H3 AND H2 > H4)    

L2 * ABS(L > L1 AND L1 > L2 AND L2 < L3 AND L3 < L4)
 
So can i please get % value as output from 0 -100
 
thanks a lot 
 

 

Bruce_L
Posted : Thursday, June 28, 2018 4:00:03 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

Thank you for your suggestion.

Even with the picture, the explanation doesn't make any sense to me.

What is the "current close range"? Seriously, this phrase is completely meaningless to me.

OK. highest high of 5 bars (MAXH5) and lowest low of 5 bars (MINL5)... we could get where the close is relative to this range as:

STOC5

But then you give some formulas identifyng swing high 2 and swing low 2.

And how to identify the first candle and last candle to get the open and close?

I really, really don't get it. Frankly, the sentences and picture seems contradictory instead of complimentary when trying to come to any sort of conclusion as to what you are asking.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Thursday, June 28, 2018 4:25:31 PM
Registered User
Joined: 3/10/2012
Posts: 465

Okay bruce sorry ignore the word Range in my current close statement ,,, 

What i was intending to achieve is blending of bars "  so the image that i posted uses the highest high and lowest low in a certain range but i choose to use 5 bar as a range look back period and thats why i put those swing formulas

But if there is another way of doing it then ignore those swing formulas... 

the picture uses the black bar to inform what is the sentiment of new incoming bar when Open of First bar and close of last bar used as BODY OF CANDLE , so my question was 

Position of the Body in that range whether it is near the high of the range -mid of the range or low of the range and whether the candle will become GREEN OR RED  based on open and close 

Cheers

Bruce_L
Posted : Thursday, June 28, 2018 4:34:05 PM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

How do I determine the first and last bar (or at least the first bar assuming the current bar is the last bar)?

I mean if we know it is five bars with the current bar being the last bar (C) and the open being the open of 4 bars ago (O4), then we can check for the close being above the open.

C > O4

Or below the open.

C < O4

And we can determine where price is relative to the range.

STOC5

And since we know the high would be MAXH5 and the low would be MINL5, we can calculate where the open is relative to the range as well.

100 * (O4 - MINL5) / (MAXH5 - MINL5)

And how big the body is relative to the range.

100 * ABS(C - O4) / (MAXH5 - MINL5)

And even create a directional version which both gives you the size of the body relative to the range and if it is green (+) or red (-).

100 * (C - O4) / (MAXH5 - MINL5)

But how to we know it is five bars?



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
dhirenshah
Posted : Friday, June 29, 2018 1:04:23 AM
Registered User
Joined: 3/10/2012
Posts: 465

Bruce the options that you gave above from that i was looking for 

100 * (C - O4) / (MAXH5 - MINL5)   i just added O4 instead and that solves for me.. 

Here is the graphic representation of what i was trying to achieve and 5 bars was counting most recent 5 bars where current bar is bar 1 ,, I thought of using from swings but then it will confuse the topic , 

https://www.dhirenshah.com/241-2/

https://www.dhirenshah.com/247-2/

Anyways thanks a lot 

Cheers

Happy July 04th 

 

Bruce_L
Posted : Friday, June 29, 2018 9:41:03 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

You're welcome. Have a happy Fourth of July!



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.