NexusFi: Find Your Edge


Home Menu

 





Time Segmented Volume from Worden Telecharts


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one dataevolved with 4 posts (0 thanks)
    2. looks_two cory with 3 posts (9 thanks)
    3. looks_3 JC195461 with 1 posts (1 thanks)
    4. looks_4 Alexandre220 with 1 posts (0 thanks)
    1. trending_up 9,855 views
    2. thumb_up 16 thanks given
    3. group 8 followers
    1. forum 10 posts
    2. attach_file 7 attachments




 
Search this Thread

Time Segmented Volume from Worden Telecharts

  #1 (permalink)
 dataevolved 
Australia
 
Experience: Advanced
Platform: NinjaTrader, MotiveWave
Trading: forex, oil, gold, silver
Posts: 4 since Nov 2010
Thanks Given: 4
Thanks Received: 0

Hi

I was wondering if anyone has a ninjatrader version of Worden's TSV as per this thread ( ) which was a port to TOS by cbritton as per below. If not, could someone port this for me.

thanks very much
D.


cbritton View Post
Try this:

 
Code
# Time Segmented Value (TSV)

input length = 18;
input avgLength = 10;

# TSV=(Sum( IIf( C > Ref(C,-1), V * ( C-Ref(C,-1) ),
# IIf( C < Ref(C,-1),-V * ( C-Ref(C,-1) ), 0 ) ) ,18)); 

plot TSV = sum( if close > close[1] then volume * (close - close[1]) else if close < close[1] then -1* volume *(close - close[1]) else 0, length);

Plot TSVAvg = Average(TSV, avglength);
You can modify the averaging function to whatever you want.

-C


Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Trade idea based off three indicators.
Traders Hideout
Cheap historycal L1 data for stocks
Stocks and ETFs
NexusFi Journal Challenge - May 2024
Feedback and Announcements
REcommedations for programming help
Sierra Chart
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
What is Markets Chat (markets.chat) real-time trading ro …
76 thanks
Spoo-nalysis ES e-mini futures S&P 500
55 thanks
Just another trading journal: PA, Wyckoff & Trends
37 thanks
Bigger Wins or Fewer Losses?
24 thanks
The Program
17 thanks
  #2 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


dataevolved View Post
Hi

I was wondering if anyone has a ninjatrader version of Worden's TSV as per this thread ( ) which was a port to TOS by cbritton as per below. If not, could someone port this for me.

thanks very much
D.

the TOS conversion is not correct you can see TSO version stay above zero line. Look at TC2000 TSV it moves above and below zero line.

Attached Thumbnails
Click image for larger version

Name:	exh1.png
Views:	429
Size:	136.8 KB
ID:	108357   Click image for larger version

Name:	exh2.png
Views:	426
Size:	417.7 KB
ID:	108358  
Reply With Quote
Thanked by:
  #3 (permalink)
 dataevolved 
Australia
 
Experience: Advanced
Platform: NinjaTrader, MotiveWave
Trading: forex, oil, gold, silver
Posts: 4 since Nov 2010
Thanks Given: 4
Thanks Received: 0


thanks for letting me know Cory, as I do not use ToS I assumed this was a correct version as per that thread. I would use TC2000 but they only focus only on the US markets, but I also need Australian market too. Appreciate your effort, thanks.

D.

Started this thread Reply With Quote
  #4 (permalink)
 dataevolved 
Australia
 
Experience: Advanced
Platform: NinjaTrader, MotiveWave
Trading: forex, oil, gold, silver
Posts: 4 since Nov 2010
Thanks Given: 4
Thanks Received: 0

this version plots above and below the y axis. In essence the function is similar but I am unable to confirm as it is a different instrument, with potentially different volume data. The original source with comments for this was
FXCodeBase.COM: Forex Chart Indicators and Development &bull; View topic - Time Segmented Volume
and the lua code as follows (it uses candles instead of linear output):

 
Code
-- Indicator profile initialization routine
-- Defines indicator profile properties and indicator parameters
-- TODO: Add minimal and maximal value of numeric parameters and default color of the streams
function Init()
    indicator:name("Time Segmented Volume");
    indicator:description("Time Segmented Volume");
    indicator:requiredSource(core.Bar);
    indicator:type(core.Oscillator);
    indicator.parameters:addGroup("Calculation");	
    indicator.parameters:addInteger("Period", "Period", "Period", 14);
	
	indicator.parameters:addGroup("Style");	
    indicator.parameters:addColor("Up_color", "Positive TSV Color", "Color of TSV", core.rgb(0, 255, 0));
	indicator.parameters:addColor("Dn_color", "Negativ TSV Color", "Color of TSV", core.rgb( 255,0 , 0));
end

-- Indicator instance initialization routine
-- Processes indicator parameters and creates output streams
-- TODO: Refine the first period calculation for each of the output streams.
-- TODO: Calculate all constants, create instances all subsequent indicators and load all required libraries
-- Parameters block
local Period;

local first;
local source = nil;
local temp;
-- Streams block
local TSV = nil;

-- Routine
function Prepare(nameOnly)
    Period = instance.parameters.Period;
    source = instance.source;	
	
	 assert(source:supportsVolume(), "The source must have volume");	 
	 
    first = source:first()+Period;

    local name = profile:id() .. "(" .. source:name() .. ", " .. tostring(Period) .. ")";
    instance:name(name);
	
	temp = instance:addInternalStream(0, 0);

    if (not (nameOnly)) then
        TSV = instance:addStream("TSV", core.Bar, name, "TSV", instance.parameters.Up_color, first);		
    end
end

-- Indicator calculation routine
-- TODO: Add your code for calculation output values
function Update(period)
  
	
	if source.close[period]> source.close[period-1] then
	temp[period]=  source.volume[period] * (source.close[period]- source.close[period-1]);
	elseif source.close[period]< source.close[period-1] then
	temp[period]=   (-1) * source.volume[period] * (source.close[period-1]-source.close[period]  );
	else
    temp[period]=0;
	end

	if period <  first then
	return;
	end
	
    TSV[period] = mathex.sum(temp, period-Period+1, period);
	
	if TSV[period] > TSV[period-1] then
	TSV:setColor(period, instance.parameters.Up_color);
	else
	TSV:setColor(period, instance.parameters.Dn_color);
    end	
    
end
thanks again
D.

Started this thread Reply With Quote
  #5 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

try this

Attached Thumbnails
Click image for larger version

Name:	ES 06-13 (5 Min)  4_11_2013.jpg
Views:	433
Size:	76.0 KB
ID:	108444  
Attached Files
Elite Membership required to download: TSV_NT.zip
Reply With Quote
  #6 (permalink)
 dataevolved 
Australia
 
Experience: Advanced
Platform: NinjaTrader, MotiveWave
Trading: forex, oil, gold, silver
Posts: 4 since Nov 2010
Thanks Given: 4
Thanks Received: 0

thanks v much Cory, I give it a rip, and get back.

Started this thread Reply With Quote
  #7 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

now with down color zone

Attached Thumbnails
Click image for larger version

Name:	cz.png
Views:	694
Size:	78.5 KB
ID:	108572  
Attached Files
Elite Membership required to download: TSV_NT.cs
Reply With Quote
  #8 (permalink)
 bartlb 
Albuquerque New Mexico United States
 
Experience: Intermediate
Platform: NT
Trading: ES
Posts: 1 since Mar 2013
Thanks Given: 3
Thanks Received: 1

This is a TSV approximation I've used for some time in my signal generation code with Telechart. I find that it is very true to Worden's TSV line form.

The Telechart PCF is TSV = V*(C-C1)/((H-L+ABS(H-C1)+ABS(C1-L)+0.0000001)/2).


The NT indicator for this is attached.

Attached Files
Elite Membership required to download: TSV.zip
Reply With Quote
  #9 (permalink)
Alexandre220
Durban/South Africa
 
Posts: 1 since Apr 2018
Thanks Given: 1
Thanks Received: 0

Hi Guys

Any updated versions for NT8 relating to the TSV indicators?

Regards
Alex

Reply With Quote
  #10 (permalink)
 JC195461 
Redondo Beach, CA
 
Experience: Beginner
Platform: TOS & TS
Trading: Options
Posts: 25 since Feb 2013
Thanks Given: 6
Thanks Received: 14


Hello Everybody,

Does anyone have a Time Segmented Volume Indicator (TSV) for NT-8?



Thank you,

Jeff

Reply With Quote
Thanked by:




Last Updated on August 13, 2021


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts