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 |

Painting vol bars based on DR Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
thnkbigr
Posted : Thursday, January 18, 2018 6:01:52 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Bruce,

In SF and I am mainly in V4 I like to paint the volume bars based on where the stock closed in its daily range including gaps 

For example if the stock closed in middle of its daily range it will plot the bottom half of the vol bar Green and the top half Red 

If closed at 75% of the DR then the bottom 75% of the Vol bar will be green and top 25% will be red  

Bruce_L
Posted : Friday, January 19, 2018 9:10:02 AM


Worden Trainer

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

Plot normal volume bars in red.

Then plot the following RealCode Indicator overtop the green bars using the Bars plot style in the same pane and scale.

Plot = Volume.Value * (Price.Last - System.Math.Min(Price.Low, Price.Last(1))) / (System.Math.Max(Price.High, Price.Last(1)) - System.Math.Min(Price.Low, Price.Last(1)))



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Thursday, February 1, 2018 1:08:39 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Bruce in the above pcf you have Price.Last(10) 

I feel like that's a typo and should be 1 

correct? 

Bruce_L
Posted : Thursday, February 1, 2018 1:12:17 PM


Worden Trainer

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

Yes, it should be a 1 and not a 10.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Thursday, April 12, 2018 3:49:33 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

By any chance can something like this be done in TC

Bruce_L
Posted : Thursday, April 12, 2018 3:56:48 PM


Worden Trainer

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

Yes, it is possible and relatively straightforward.

Add Volume to the chart and edit to uncheck Color by Price and make sure the Plot Color is set to red.

Overlay a Custom PCF Indicator into the same pane and scale as volume.

Set the Plot Style ho Histogram and the Color to green for the Custom PCF Indicator.

Use the following Formula in the Custom PCF Indicator.

V * IIF(H > L OR H <> C1, (C - LEAST(L, C1)) / (GREATEST(H, C1) - LEAST(L, C1)), 1 / 2)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Tuesday, July 17, 2018 3:26:05 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Bruce

Can you do this in RC for SF V4 please

If stock closed up and Vol was higher than any of the down day volume's in the last 10 days this indicator will plot 10, but if  today's Vol was higher than any of the down day volum's in the last 40 days it will plot 40 and so on all the way to 63

IIF(C > C1, IIF(C1 < C2 AND V <= V1, 0, IIF(C2 < C3 AND V <= V2, 1, IIF(C3 < C4 AND V <= V3, 2, IIF(C4 < C5 AND V <= V4, 3, IIF(C5 < C6 AND V <= V5, 4, IIF(C6 < C7 AND V <= V6, 5, IIF(C7 < C8 AND V <= V7, 6, IIF(C8 < C9 AND V <= V8, 7, IIF(C9 < C10 AND V <= V9, 8, IIF(C10 < C11 AND V <= V10, 9, IIF(C11 < C12 AND V <= V11, 10, IIF(C12 < C13 AND V <= V12, 11, IIF(C13 < C14 AND V <= V13, 12, IIF(C14 < C15 AND V <= V14, 13, IIF(C15 < C16 AND V <= V15, 14, IIF(C16 < C17 AND V <= V16, 15, IIF(C17 < C18 AND V <= V17, 16, IIF(C18 < C19 AND V <= V18, 17, IIF(C19 < C20 AND V <= V19, 18, IIF(C20 < C21 AND V <= V20, 19, IIF(C21 < C22 AND V <= V21, 20, IIF(C22 < C23 AND V <= V22, 21, IIF(C23 < C24 AND V <= V23, 22, IIF(C24 < C25 AND V <= V24, 23, IIF(C25 < C26 AND V <= V25, 24, IIF(C26 < C27 AND V <= V26, 25, IIF(C27 < C28 AND V <= V27, 26, IIF(C28 < C29 AND V <= V28, 27, IIF(C29 < C30 AND V <= V29, 28, IIF(C30 < C31 AND V <= V30, 29, IIF(C31 < C32 AND V <= V31, 30, IIF(C32 < C33 AND V <= V32, 31, IIF(C33 < C34 AND V <= V33, 32, IIF(C34 < C35 AND V <= V34, 33, IIF(C35 < C36 AND V <= V35, 34, IIF(C36 < C37 AND V <= V36, 35, IIF(C37 < C38 AND V <= V37, 36, IIF(C38 < C39 AND V <= V38, 37, IIF(C39 < C40 AND V <= V39, 38, IIF(C40 < C41 AND V <= V40, 39, IIF(C41 < C42 AND V <= V41, 40, IIF(C42 < C43 AND V <= V42, 41, IIF(C43 < C44 AND V <= V43, 42, IIF(C44 < C45 AND V <= V44, 43, IIF(C45 < C46 AND V <= V45, 44, IIF(C46 < C47 AND V <= V46, 45, IIF(C47 < C48 AND V <= V47, 46, IIF(C48 < C49 AND V <= V48, 47, IIF(C49 < C50 AND V <= V49, 48, IIF(C50 < C51 AND V <= V50, 49, IIF(C51 < C52 AND V <= V51, 50, IIF(C52 < C53 AND V <= V52, 51, IIF(C53 < C54 AND V <= V53, 52, IIF(C54 < C55 AND V <= V54, 53, IIF(C55 < C56 AND V <= V55, 54, IIF(C56 < C57 AND V <= V56, 55, IIF(C57 < C58 AND V <= V57, 56, IIF(C58 < C59 AND V <= V58, 57, IIF(C59 < C60 AND V <= V59, 58, IIF(C60 < C61 AND V <= V60, 59, IIF(C61 < C62 AND V <= V61, 60, IIF(C62 < C63 AND V <= V62, 61, IIF(C63 < C64 AND V <= V63, 62, 63))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))), 0)

 

 

Bruce_L
Posted : Tuesday, July 17, 2018 4:00:57 PM


Worden Trainer

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

Please try the following RealCode Indicator.

If CurrentIndex >= 63
	Dim PP As Integer = 0
	If Price.Last > Price.Last(1) Then
		PP = 63
		For i As Integer = 1 To 62
			If Price.Last(i) < Price.Last(i + 1) AndAlso _
				Volume.Value <= Volume.Value(i) Then
				PP = i
				Exit For
			End If
		Next
	End If
	Plot = PP
Else
	Plot = Single.NaN
End If


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Thursday, July 19, 2018 12:59:03 AM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Bruce 

Something is wrong with the RC because for AEIS today 7/18 the indicator should read 63 since today's Vol is higher than any down day vol in the last 63 days but it reads 3

I tried multiple symbols and the Ind is not correct

  

Bruce_L
Posted : Thursday, July 19, 2018 8:29:29 AM


Worden Trainer

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

I made a small change to the code, please try it again.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Thursday, July 19, 2018 9:56:48 AM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Now it returns 0

Does it work on your end 

Bruce_L
Posted : Thursday, July 19, 2018 10:05:21 AM


Worden Trainer

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

EIS doesn't currently have a positive net change. It seems to work for me. That said, I have made another change to the code.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Sunday, July 22, 2018 2:06:14 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Bruce I finally had a chance to play with this and there is only one small diff between teh PCF in TC vs the one that you just wrote for SF

For ex the OPCF in TC on Friday reads 34 on MSFT but the RC in SF reads 35. I went through a lot of symbols and in SF the RC always reads 1 point higher than the one in TC. 

But those that read 63 which is the max are the same in both.  

It seems in SF teh RC is counting today as 1 Day while in TC it doesn't count today as a day and it starts counting from yesterday

Bruce_L
Posted : Monday, July 23, 2018 9:49:46 AM


Worden Trainer

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

We should be able to just subtract 1 from everything then.

If CurrentIndex >= 64
	Dim PP As Integer = 1
	If Price.Last > Price.Last(1) Then
		PP = 64
		For i As Integer = 1 To 63
			If Price.Last(i) < Price.Last(i + 1) AndAlso _
				Volume.Value <= Volume.Value(i) Then
				PP = i
				Exit For
			End If
		Next
	End If
	Plot = PP - 1
Else
	Plot = Single.NaN
End If


-Bruce
Personal Criteria Formulas
TC2000 Support Articles
thnkbigr
Posted : Monday, July 23, 2018 12:05:30 PM
Platinum Customer Platinum Customer

Joined: 3/31/2006
Posts: 3,207

Thanks 

Bruce_L
Posted : Monday, July 23, 2018 12:54:25 PM


Worden Trainer

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

You're welcome.



-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.