Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 691
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Little mistake: 0=Close, 1=Open, the rest is correct.
Open is not needed. The main task was how to put variables in the tester to make EA runs based on the indicator, which can be built on different types of prices.
Here we should not forget to set price from 1 to 6, in increments of one, when optimizing.
Can you please tell me if an EA written for MT5 can be run on the latest MT4 and vice versa?
Open is not needed. The main task was how to put variables in the tester to make EA runs based on the indicator, which can be built on different types of prices.
Here we should not forget to set price from 1 to 6, in increments of one, when optimisation is carried out.
But the Open price is 1, the Close price is 0. See Doc!
If anyone needs it, I've worked out how to do a price-type indicator rendering without complicated constructions:
This may be easier, but if you need to add more price types, it's certainly better to do it your way, or rather a combined way
If it compiles, you can run it, but whether it will work as intended is the question.
thanks
Maybe it's easier, but if you need to add more types of prices, then of course it's better to do it your way, or rather a combined method
That's genius! I hadn't thought of this method.
But the Open price is 1 and the Close price is 0. See Doc!
If you use "ENUM_APPLIED_PRICE" enumerations.
But I don't use them, I just use a conditional operator to check all six options for truth and only one condition always works.
For example, the condition worked and we calculated the price:
I receive the close price to be calculated. That is, I prepare the prices myself and do not take them from enumeration "ENUM_APPLIED_PRICE".That's genius! I hadn't thought of that way.
This method will work only when calling technical indicators, if you have to change price type in other calculations through settings (say, you want to compare some value with Close[i] and pass it through optimizer to (High[i]+Low[i])/2, i.e. with PRICE_MEDIAN), it will not work.
This way will work only when calling technical indicators, if you have to change price type in other calculations through settings (for example, you compare some value with Close[i] and want to pass through optimizer to compare it with (High[i]+Low[i])/2, i.e. with PRICE_MEDIAN), it will not work.
Prices are only needed to calculate the indicator.
I did it like this:
Compared this variant and its all the same when changing.
If you use "ENUM_APPLIED_PRICE" enumerations.
But I don't use them, I just use a conditional operator to check all six options for truth and only one condition always works.
For example, the condition worked and the price was calculated:
I get the closing price for the calculation. That is, I prepare the prices myself and do not take their enumeration "ENUM_APPLIED_PRICE".It is possible to redo everything, but it will only work in this particular case! It is better to proceed from documented constants to avoid confusion in the future!