axlerod
Member
Hello,
Having a silly mental block today just can't understand if it's cuz i haven't slept in 2 days lol but need some help.
I have a custom column I am trying to do. 2 Custom Columns OUTPUT and $ Dollar Volume
1. Volume Converted To $ Dollar Volume Traded
EXAMPLE CCTL 1d $ Volume on 8/11 was $1,224,723 and the volume was 365,589,039
I am trying to convert the VOLUME into $ Volume on 1D time frame and can't get it to match I'm off by a few hundred.
2. OUTPUT
THEN I am trying to get this formula to match this equation. Todays $ Volume / (divided) by the 20 day average $ Dollar Volume.
EXAMPLE: Output on 8/11 should be 9 but im getting something different. (Basically stating that on 8/11 the $ Volume Traded TODAY was 9x greater than the 20day average)
PREVIOUS 20 Days Data - I TYPED UP all the data for the Volume, $ Volume and Output that it SHOULD BE when converted to the columns but it isn't working when I coded it in the columns. Google Sheets - https://docs.google.com/spreadsheets/d/1eC1kyAd0uCCaIBJReLLygPi3cRjG1jY5WtO3_asvNXc/edit?usp=sharing
If anyone can help me with this mental block that be great! Thank you god bless and hope everyone is safe and healthy!
Having a silly mental block today just can't understand if it's cuz i haven't slept in 2 days lol but need some help.
I have a custom column I am trying to do. 2 Custom Columns OUTPUT and $ Dollar Volume
1. Volume Converted To $ Dollar Volume Traded
EXAMPLE CCTL 1d $ Volume on 8/11 was $1,224,723 and the volume was 365,589,039
I am trying to convert the VOLUME into $ Volume on 1D time frame and can't get it to match I'm off by a few hundred.
Code:
plot DollarVolume = hl2 * Volume;
#also it's missing the , (commas) cuz it's showing the full 9 digits but without commas as I read on ThinkScript I can do AsDollars to make it have commas but didn't work.
2. OUTPUT
THEN I am trying to get this formula to match this equation. Todays $ Volume / (divided) by the 20 day average $ Dollar Volume.
EXAMPLE: Output on 8/11 should be 9 but im getting something different. (Basically stating that on 8/11 the $ Volume Traded TODAY was 9x greater than the 20day average)
Code:
def days20dollarvol = Average(volume, 20)*hl2;
def todaydollarvol = hl2 * volume;
plot output = todaydollarvol / days20dollarvol;
PREVIOUS 20 Days Data - I TYPED UP all the data for the Volume, $ Volume and Output that it SHOULD BE when converted to the columns but it isn't working when I coded it in the columns. Google Sheets - https://docs.google.com/spreadsheets/d/1eC1kyAd0uCCaIBJReLLygPi3cRjG1jY5WtO3_asvNXc/edit?usp=sharing
If anyone can help me with this mental block that be great! Thank you god bless and hope everyone is safe and healthy!
Last edited: