Hi,
1st off, thanks for such a fantastic trading platform. And thanks to the folks who answer these questions. It has really helped me.
The reason is, I'm not even good enough at programming to be dangerous. I was looking through the efs's that are listed and saw something that sparked my interest, the ForceIndex.
It shows volume displayed in a useful way - if the current bar closed lower than the previous bar, the volume bar is displayed less than zero, rather than just the usual red line up.
Also, the volume is multiplied by the close difference, whether up or down, and a moving average.
Here's my question, I'd like to simply display volume from a down bar as a histogram that displays below zero, by the volume amount of that particular bar. Of course with an up bar, a positive volume line would be shown as usual.
I've been trying a few things and this is what I have so far - but since I don't know what I'm doing, it doesn't work ...
From the magnificent programming abilities of the folks here, I was hoping you could get a bit of a chuckle from this and perhaps spend about as much time as 1/n as I have, where n has been a larger number than I'd like to specify !
And thanks to Steve Hare who helped me before and Alexis who I am also indebted to.
Best Regards, Glenn Swiatek San Mateo, CA
var bInit = false;
function preMain() {
setStudyTitle("gV");
setCursorLabelName ("Var0", 0);
setDefaultBarFgColor(Color.yellow, 0);
setPlotType(PLOTTYPE_HISTOGRAM, 0);
setPriceStudy(false);
}
function main () {
if ( bInit == false ) {
DeltaC = close(0) - close(-1) ;
Voly0 = volume(0) ;
bInit = true;
}
myDeltaC = DeltaC.getValue(0);
myVoly = Voly0.getValue(0);
Voly1 = myDeltaC * myVoly ;
AbsV1 = Math.abs(Voly1) ;
Voly2 = Voly1 / AbsV1 ;
return (Voly2);
}
1st off, thanks for such a fantastic trading platform. And thanks to the folks who answer these questions. It has really helped me.
The reason is, I'm not even good enough at programming to be dangerous. I was looking through the efs's that are listed and saw something that sparked my interest, the ForceIndex.
It shows volume displayed in a useful way - if the current bar closed lower than the previous bar, the volume bar is displayed less than zero, rather than just the usual red line up.
Also, the volume is multiplied by the close difference, whether up or down, and a moving average.
Here's my question, I'd like to simply display volume from a down bar as a histogram that displays below zero, by the volume amount of that particular bar. Of course with an up bar, a positive volume line would be shown as usual.
I've been trying a few things and this is what I have so far - but since I don't know what I'm doing, it doesn't work ...
From the magnificent programming abilities of the folks here, I was hoping you could get a bit of a chuckle from this and perhaps spend about as much time as 1/n as I have, where n has been a larger number than I'd like to specify !
And thanks to Steve Hare who helped me before and Alexis who I am also indebted to.
Best Regards, Glenn Swiatek San Mateo, CA
var bInit = false;
function preMain() {
setStudyTitle("gV");
setCursorLabelName ("Var0", 0);
setDefaultBarFgColor(Color.yellow, 0);
setPlotType(PLOTTYPE_HISTOGRAM, 0);
setPriceStudy(false);
}
function main () {
if ( bInit == false ) {
DeltaC = close(0) - close(-1) ;
Voly0 = volume(0) ;
bInit = true;
}
myDeltaC = DeltaC.getValue(0);
myVoly = Voly0.getValue(0);
Voly1 = myDeltaC * myVoly ;
AbsV1 = Math.abs(Voly1) ;
Voly2 = Voly1 / AbsV1 ;
return (Voly2);
}
Comment