Bar color in Awesome Oscillator?

To add comments, please log in or register
Forex Trader
114484
Forex Trader  
I am new to the community ... my first post here.
Hope this is not a real stupid question:
I saw a post for this same question ... but no answer.

Does anyone have a method for returning the current color of the Awesome Oscillator within Meta-Trader?
MT4 has a function for returning the numeric value using iAO , but not the color.
Hopefully such a function would allow a test of (i) time frames backwards also.
Forex Trader
114484
Forex Trader  
Try this:

double val1= iAO(NULL,0, i);
double val2= iAO(NULL,0, i+1);

if (val1>val2) { // green

}
else {   // red

}



Cheers


Markus

Forex Trader
114484
Forex Trader  

Try this:

double val1= iAO(NULL,0, i);
double val2= iAO(NULL,0, i+1);

if (val1>val2) { // green

}
else {   // red

}



Cheers


Markus






Thanks Markus ... I am half way there now, thanks to you. Here is the trick part of the question:
1 - If there was a bar formation of red-red-red each one would be less than the one before it
2 - If the formation was green-red-red they would all be less than each other also (same as #1)

How could I determine when that a color change has occoured?


... thank you so much for the fast answer last time.

Peter in Minnesota
Forex Trader
114484
Forex Trader  

Try this:

double val1= iAO(NULL,0, i);
double val2= iAO(NULL,0, i+1);

if (val1>val2) { // green

}
else {   // red

}


// The only way you can see tick formation is by printing to Expert tab on Terminal screen.
// The Volume is your tick number.


if (val1>val2) { Print(Volume[i]," green");

}
else {Print(Volume[i]," red");

}













Forex Trader
114484
Forex Trader  
double val1= iAO(NULL,0, i);
double val2= iAO(NULL,0, i+1);
double val3= iAO(NULL,0, i+2);

if (val2<val3 && val1>val2 ) { // color switch red -> green

}
else
if (val2>val3 && val1<val2 ) { // green -> red

}




:-D


Markus

Forex Trader
114484
Forex Trader  

double val1= iAO(NULL,0, i);
double val2= iAO(NULL,0, i+1);
double val3= iAO(NULL,0, i+2);

if (val2<val3 && val1>val2 ) { // color switch red -> green

}
else
if (val2>val3 && val1<val2 ) { // green -> red

}




:-D


Markus





Briliant is so often simple ... thanks Markus!

Peter in Minnesota
Forex Trader
114484
Forex Trader  
Glad to have been of help.


Markus
To add comments, please log in or register