0% found this document useful (0 votes)
320 views3 pages

Indicadores Tryd

This document contains the code for two HeatMap indicator scripts. The first script colors candlesticks on a price chart based on the volume of each candlestick relative to the moving average volume. The second script plots five lines representing the moving average volume and multiples of the standard deviation away from the average to color code actual volume values. Both scripts are designed to help identify periods of higher or lower than average volume using heatmaps.

Uploaded by

edson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
320 views3 pages

Indicadores Tryd

This document contains the code for two HeatMap indicator scripts. The first script colors candlesticks on a price chart based on the volume of each candlestick relative to the moving average volume. The second script plots five lines representing the moving average volume and multiples of the standard deviation away from the average to color code actual volume values. Both scripts are designed to help identify periods of higher or lower than average volume using heatmaps.

Uploaded by

edson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 3

HeatMap Magic Bars-TT-v2.

// Indicador: HeatMap Bars - TT


// v2.0: Corrigido para volume quantitativo
// v1.0: release
// Tonny Matos Siqueira - [email protected]
// Telegram: @tmsiqueira
// Will Santos - http://youtube.com/clubedoscalp
// Baseado no indicador VolumeOnCandle
// https://blog.tryd.com.br/scripts/script/indicadores/VolumeOnCandle.txt

// Settings //
def len = 60;
def red = 3.5;
def orange = 2.5;
def yellow = 1.5;
def white = 0.5;
// End //

def barras = BARS();

r = newLines();
r.add( barras );

def vol = sharesVolume();


def mean = MA(vol,len,0);
for (int i=0;i<vol.size();i++) {
def bar = barras.bar(i);
def res = 0;

if (i>len) {
res = vol.value(i)/mean.value(i-len+1);
}
if (res > red) {
bar.setFill(255,0,0);
bar.setBorder(255,0,0);
//bar.setBorder(0,0,0);
}else if (res > orange) {
bar.setFill(255,128,0);
bar.setBorder(255,128,0);
//bar.setBorder(0,0,0);
}else if (res > yellow) {
bar.setFill(250,244,2);
bar.setBorder(250,244,2);
//bar.setBorder(0,0,0);
}else if (res > white) {
bar.setFill(255,255,255);
bar.setBorder(255,255,255);
//bar.setBorder(0,0,0);
}else {
bar.setFill(0,252,252);
bar.setBorder(0,252,252);
//bar.setBorder(0,0,0);
}
}
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

HeatMap Average Volume-TT-v2.0

// Indicador: HeatMap Average Volume - TT


// v2.0: Corrigido para volume quantitativo
// v1.0: release
// Tonny Matos Siqueira - [email protected]
// Telegram: @tmsiqueira
// Parametros de configuracao //
def len = 400;
def red = 4;
def orange = 2.5;
def yellow = 1;
def white = -0.5;
// Fim Parametros de configuracao //

def v = newLineData();
def l1 = newLineData(); //media
def l2 = newLineData(); //white
def l3 = newLineData(); //yellow
def l4 = newLineData(); //orange
def l5 = newLineData(); //red

def vol = sharesVolume();


def mean = MA(vol,len, 0);
def std = STDDEV(vol,len);

for (int i=len;i<vol.size();i++) {


if (i>len) {
double res = ( (vol.value(i) - mean.value(i-len+1)) / (std.value(i-len)));

double vatual = vol.value(i);


double matual = mean.value(i-len+1);
double desvp = std.value(i-len);

double val=0.0;

val=matual;
l1.add(val);
l1.setColor(0,0,255);

val=matual+desvp*white;
l2.add(val);
l2.setColor(255,255,255);

val=matual+desvp*yellow;
l3.add(val);
l3.setColor(255,244,2);

val=matual+desvp*orange;
l4.add(val);
l4.setColor(255,128,0);

val=matual+desvp*red;
l5.add(val);
l5.setColor(255,0,0);
if (res > red) v.setColor(255,0,0);
else if (res > orange) v.setColor(255,128,0);
else if (res > yellow) v.setColor(255,244,2);
else if (res > white) v.setColor(255,255,255);
else v.setColor(0,252,252);

v.add(vatual);
v.setType(3);
}
}
def result = newLines();
result.add(v);
result.add(l1);
result.add(l2);
result.add(l3);
result.add(l4);
result.add(l5);
r = result;

You might also like