Hi,
I'm very "challenged" for programming and very thankful for the help I've received on this forum. I had an idea recently to plot what turns out to be an interesting oscillator that even I could code.
It simply plots the distance from the 20 period Wma to the high of the bar. ( And the same thing can be done for the low ).
What I would like to automatically have the program do is draw text of the actual market value on the plot when the distance of the current bar is greater than the distance of the previous bar.
The picture shows an example of what it would look like, " If I only could, I sure do would ". But I'm simply too poor at programming.
Hopefully the attachment goes through.
Best Regards To All
Glenn
//fox2
addBand( 0,PS_DASH ,2,Color.RGB(250,250,250),0);
addBand( 10,PS_SOLID,2,Color.RGB(100,0,0),1);
addBand( 15,PS_SOLID,2,Color.RGB(100,0,0),3);
var bInit = false;
function preMain() {
setDefaultBarFgColor(Color.RGB(190,0,0),0);
}
function main() {
if ( bInit == false ) {
s20 = wma(20) ;
bInit = true;
}
s20y = s20.getValue(0);
cH = high(0) ;
d20H = (cH- s20y);
return d20H;
}
I'm very "challenged" for programming and very thankful for the help I've received on this forum. I had an idea recently to plot what turns out to be an interesting oscillator that even I could code.
It simply plots the distance from the 20 period Wma to the high of the bar. ( And the same thing can be done for the low ).
What I would like to automatically have the program do is draw text of the actual market value on the plot when the distance of the current bar is greater than the distance of the previous bar.
The picture shows an example of what it would look like, " If I only could, I sure do would ". But I'm simply too poor at programming.
Hopefully the attachment goes through.
Best Regards To All
Glenn
//fox2
addBand( 0,PS_DASH ,2,Color.RGB(250,250,250),0);
addBand( 10,PS_SOLID,2,Color.RGB(100,0,0),1);
addBand( 15,PS_SOLID,2,Color.RGB(100,0,0),3);
var bInit = false;
function preMain() {
setDefaultBarFgColor(Color.RGB(190,0,0),0);
}
function main() {
if ( bInit == false ) {
s20 = wma(20) ;
bInit = true;
}
s20y = s20.getValue(0);
cH = high(0) ;
d20H = (cH- s20y);
return d20H;
}
Comment