Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 945
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
How do I get the number of Fibonacci levels?
I build them using classes from the standard library:
well, levels_count is always 0
How do I get the number of Fibonacci levels?
I build them using classes from the standard library:
well, levels_count is always 0
There are no levels when creating fibo. Once created, the number of levels is set and values, descriptions and other object properties are assigned.
Can you tell me, is it possible to use static fields in classes in MQL? I want a weird one, like this:
// ...
int OnInit()
{
//---
A::test();
//---
return(INIT_SUCCEEDED);
}
//...
class A{
public:
static int t;
A(){};
~A(){};
static void test(){
if(Is_Works){
Print (t); // unresolved static variable 'AA::t'
}
}
};
Can you tell me, is it possible to use static fields in classes in MQL? I want a weird one, like this:
It's clear that I can create an instance of a class inside a method, but I want it without instances... Is it possible?For example, I set in the tester that the EA should be tested from 20.07.2019 to 20.08.2019.
Can I somehow write in the EA code to make it know this date20.08.2019 ? The end date of testing.
So that it finds this out at the beginning of the test, in the OnInit function, or at the beginning of the OnTick function.
Good evening .Maybe someone already has or has tried to make or has a link to a ready made Fibo extension tool with vertical lines.
Show a screenshot - it's not clear what you wish for.