Hello experts.
https://fxdreema.com/shared/aEgKTJ7de
Attached is the indicator file.
I've add it in My Indicators, but i want to optimize 2 input as in the image below, but i don't know how to do enum for the methods. Please help. Thank you.
Hello experts.
https://fxdreema.com/shared/aEgKTJ7de
Attached is the indicator file.
I've add it in My Indicators, but i want to optimize 2 input as in the image below, but i don't know how to do enum for the methods. Please help. Thank you.
The period is likely simple, create an int constant insert into the indicator block by right-clicking, then while optimising loop through the numbers.
The principle is likely the same for Ma method but, you will need to use the MQ lines:
https://docs.mql4.com/constants/chartconstants/enum_timeframes
type = ENUM_TIMEFRAMES
name = anything you want
value = PERIOD_CURRENT (you can choose this and it will create a drop-down in your inputs)
I don't know if you can optimize through this dropdown
Ok @jstap. Can FxDreema read the indicator if we set the timeframe other than standard minutes, like 20 minutes, 2 hours?
Not exactly, but if that is set in the EA inputs, then the EA can use this value to know what the EA is using, MT5 has other timeframes to MT4, but both can only use the pre set values
That list needs to be identical to the indicator inputs, spelt the same in the same order
can you help me make 1 example please.
You have a picture with 1/2 of what you need: your
1st input is int Time frame Current time frame
2nd input is string Button unique ID averageb1
complete all like this
So i need to follow the sequence from 1-5 to get the Period and Ma method in the list?
Yes and it is not written as a number, may need to be as it is in the indicator input, or possibly how it is on the MQ forum
By looking at your picture they are in as an int, this can and will be a number 1-2-3-4-5-6-7-8-9-10-11 etc
your list is
int
string
int
int
int
bool
double
int
Oh, my mistake. Yes the period suppose to be int.
oh, okay, i try it first.
Do you mean Price & Method also int? And the value should be Number or same text as in the indicator?
Oh man, i really don't understand this..
these are enum
Follow the picture I sent like this
enum Time frame
{
Current time frame,
1 minute,
2 minute,
continue this until you have covered all
};
If you have the MQ file this will be added automatically
@jstap something wrong. After i type everything in, when i press update button, everything gone.
I don't know if done correctly it works for me