in a custom Indicator, I have
int OnCalculate(const int _rates_total,
const int _prev_calculated,
const int _begin,
const double &_price[])
"_price" brings "price close" by default and can bring "median" "typical" etc...
as set in
#property indicator_applied_price PRICE_CLOSE
OK
Now, the question is......
what do I need to do if I need to set "applied_price"
not as "Parameters" but by "Inputs"
i mean, I write a line in "inputs" OK
input ENUM_APPLIED_PRICE xMAAppliedPr=PRICE_WEIGHTED ;
and then ? ....
Thanks !
I don't quite understand - what do you expect to happen then? After inserting such line with input parameter in your code you should just be able to select xMAAppliedPr type from a dropbox in a parameter window of your EA, that's all.
I have now my desired applied price in the variable xMAAppliedPr OK
let's say, xMAAppliedPr = "typical" i.e. (high + low+ close)/3
and, now the question
what should I do in order to... "_price" (which comes from OnCalculate)
brings now the "typical" price instead the default "close" price?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
in a custom Indicator, I have
int OnCalculate(const int _rates_total,
const int _prev_calculated,
const int _begin,
const double &_price[])
"_price" brings "price close" by default and can bring "median" "typical" etc...
as set in
#property indicator_applied_price PRICE_CLOSE
OK
Now, the question is......
what do I need to do if I need to set "applied_price"
not as "Parameters" but by "Inputs"
i mean, I write a line in "inputs" OK
input ENUM_APPLIED_PRICE xMAAppliedPr=PRICE_WEIGHTED ;
and then ? ....
Thanks !