Can the Y axis of an Adv chart be set to view percent change? Or maybe an efs has been written to allow this (on an intraday chart)?
Thanks
shaeffer
Thanks
shaeffer
function preMain() {
setPriceStudy(false);
setStudyTitle("Percent Change");
setCursorLabelName("%Chng");
addBand(0,PS_SOLID,1,Color.black);
}
var vClose = null;
function main(Time,Price) {
vClose = call("/OHLC/getPrevOHLC.efs","Close");
if(vClose==null) return;
var vPerChng= ((close()-vClose)/vClose)*100;
return vPerChng;
}
if (Symbol1 == null) Symbol1 = "$SOX";
if (Symbol2 == null) Symbol2 = "$BTK";
if (Symbol3 == null) Symbol3 = "$DOT";
if (Symbol4 == null) Symbol4 = "$GHA";
if (Symbol5 == null) Symbol5 = "$GSO";
if (Symbol6 == null) Symbol6 = "$RLX";
if (Symbol7 == null) Symbol7 = "$COMPQ";
preMain();
cSym = getSymbol();
vSymbols[0] = cSym;
function preMain() {
setPriceStudy(true);
setStudyTitle("text");
setCursorLabelName("N/A", 0);
}
function main() {
drawTextRelative(25,0,"Sector1",Color.white,Color.blue,Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOLD,
"Arial",10,"Sector1");
drawTextRelative(35,0,"Sector2",Color.white,Color.red,Text.RELATIVETOLEFT|Text.RELATIVETOBOTTOM|Text.BOLD,
"Arial",10,"Sector2");
return;
}
function preMain(){
setStudyTitle("test");
}
function main(Length){
if(Length==null)
Length=10;
return;
}
Comment