NexusFi: Find Your Edge


Home Menu

 





Convert Tradestation Volume UPDN into TOS


Discussion in ThinkOrSwim

Updated
    1. trending_up 3,359 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 1 posts
    2. attach_file 0 attachments




 
Search this Thread
  #1 (permalink)
Bobkarp
Anaheim, CA
 
Posts: 1 since Apr 2016
Thanks Given: 0
Thanks Received: 0

Can anyone help me to convert this simple Volume UPDN from Tradestation into TOS. It shows volume Difference and Ratio. This is mostly for intraday charting.

/////////////////////////////////////////////////////////////////////

//Volume UPDN

{ Plots the difference or ratio (user choice) of the cumulative up and down volume
for the day so far. For use with "live" market data only (the server fields used in
this indicator do not have stored history so will not be plotted on historical
bars). }

inputs:
DiffOrRatio_1or2( 1 ) ; // set to 1 for Up-Dn difference, 2 for Up/Dn ratio

variables:
UpDivDn( 1 ),
UpMinusDn( 0 ) ;

if GetAppInfo( aiRealTimeCalc ) = 1 then { real-time tick - not on bar in history }
begin
if DiffOrRatio_1or2 = 1 then
begin
UpMinusDn = DailyVolumeUp - DailyVolumeDn ;
Plot1( UpMinusDn, "UpDn" ) ;
//Plot2( 0, "Baseline" ) ;
If Plot1 > 0 then setplotcolor(1,green);
end
else if DiffOrRatio_1or2 = 2 then
begin
if DailyVolumeDn <> 0 then
UpDivDn = DailyVolumeUp / DailyVolumeDn ;
Plot1( UpDivDn, "UpDn" ) ;
//Plot2( 1, "Baseline" ) ;
if plot1 < 0 then setplotcolor(1,red);
end
else
RaiseRunTimeError( "DiffOrRatio_1or2 input must be 1 or 2." ) ;
end ;

////////////////////////////////////////////////////////////////////////////////

Thank you


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Strike Pause Holds, Oil Erases Monday Spike -- May CPI W …
Traders Hideout
Pakistan Mediator in Tehran as Hormuz Normalization Coll …
Prediction Markets & Event Contracts
Warsh Rate Hike at 40%, Iran June 15 Expires Tonight at …
Prediction Markets & Event Contracts
NinjaTrader Parent Payward Acquires Bitnomial for $550M …
Platforms and Indicators
May 26 Deadline Dies at 7.5% as US Strikes Iran During C …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Big Mike in Ecuador
205 thanks
Sober Journey With S&P
21 thanks
30 Sessions
20 thanks
Volume Indicators
8 thanks
Thanks Mike. Godspeed.
7 thanks
  #2 (permalink)
rruuvvii
chicago US
 
Posts: 1 since Jun 2021
Thanks Given: 0
Thanks Received: 0


Bobkarp View Post
Can anyone help me to convert this simple Volume UPDN from Tradestation into TOS. It shows volume Difference and Ratio. This is mostly for intraday charting.

/////////////////////////////////////////////////////////////////////

//Volume UPDN

{ Plots the difference or ratio (user choice) of the cumulative up and down volume
for the day so far. For use with "live" market data only (the server fields used in
this indicator do not have stored history so will not be plotted on historical
bars). }

inputs:
DiffOrRatio_1or2( 1 ) ; // set to 1 for Up-Dn difference, 2 for Up/Dn ratio

variables:
UpDivDn( 1 ),
UpMinusDn( 0 ) ;

if GetAppInfo( aiRealTimeCalc ) = 1 then { real-time tick - not on bar in history }
begin
if DiffOrRatio_1or2 = 1 then
begin
UpMinusDn = DailyVolumeUp - DailyVolumeDn ;
Plot1( UpMinusDn, "UpDn" ) ;
//Plot2( 0, "Baseline" ) ;
If Plot1 > 0 then setplotcolor(1,green);
end
else if DiffOrRatio_1or2 = 2 then
begin
if DailyVolumeDn <> 0 then
UpDivDn = DailyVolumeUp / DailyVolumeDn ;
Plot1( UpDivDn, "UpDn" ) ;
//Plot2( 1, "Baseline" ) ;
if plot1 < 0 then setplotcolor(1,red);
end
else
RaiseRunTimeError( "DiffOrRatio_1or2 input must be 1 or 2." ) ;
end ;

////////////////////////////////////////////////////////////////////////////////

Thank you


Im very interesting too!!!!

Thanks


Reply With Quote




Last Updated on June 18, 2021


© 2026 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 - Downloads - Top
no new posts