Any questions from newcomers on MQL4 and MQL5, help and discussion on algorithms and codes - page 1400 1...139313941395139613971398139914001401140214031404140514061407...1965 New comment Tretyakov Rostyslav 2021.02.27 15:24 #13991 Alexey Viktorov:Look at the Heiken Ashi indicator. It solves this problem somehow. Experiment... maybe it will work. This is the main chart, no problem there. I'm interested in the basement. Tretyakov Rostyslav 2021.02.27 15:27 #13992 So far the issue has been resolved by OBJ_TREND but don't like it when zooming in( Tretyakov Rostyslav 2021.02.27 15:36 #13993 Alexey Viktorov:Look at the Heiken Ashi indicator. It solves this problem somehow. Experiment... maybe it will work. Your tip was helpful, but alas it didn't work. It's not good at scale either( Alexey Viktorov 2021.02.27 16:45 #13994 MakarFX:Your tip helped, but alas it didn't fit At scale it's no good either( What's wrong? Tretyakov Rostyslav 2021.02.27 16:56 #13995 Alexey Viktorov:What's wrong? Visually bad klub2003 2021.02.27 20:13 #13996 Hi all! Here's the problem: Price crosses the MA down or up. I need to memorise it in order to use it later in calculating the number of points passed. This is how I understand it: double FixPrice; // variable bool Fix=false; // marker if ( Fix==false) { if ( Close[0] > MA_lo ) FixPrice = Close[0];} // measure until the price crosses the MA if ( Close[0] < MA_lo ) Fix=true; if ( Fix==true) FixPrice_L = FixPrice ; And here is the next hitch - the price is not memorized! I will be very grateful for help! Files: 2021-02-26_23-56-06.png 18 kb [Archive!] Any rookie question, [WARNING CLOSED!] Any newbie Price cross EA with Tretyakov Rostyslav 2021.02.27 21:15 #13997 klub2003: Hello all! if ( Close[0] < MA_lo ) Fix=true; only on the screenshot Close is no less than MA Alexey Viktorov 2021.02.28 07:28 #13998 klub2003: Hi all! Here's the problem: Price crosses the MA down or up. I need to memorise it in order to use it later in calculating the number of points passed. This is how I understand it: double FixPrice; // variable bool Fix=false; // marker if ( Fix==false) { if ( Close[0] > MA_lo ) FixPrice = Close[0];} // measure until the price crosses the MA if ( Close[0] < MA_lo ) Fix=true; if ( Fix==true) FixPrice_L = FixPrice ; And here is the next hitch - the price is not memorized! I would be very grateful for your help! Learn to insert code. Where variables are declared double FixPrice; // переменная bool Fix=false; // маркер Konstantin Nikitin 2021.02.28 07:59 #13999 klub2003: And then there's the hitch - the price isn't remembered! I would be very grateful for your help! Declare globally double FixPrice; // переменная bool Fix=false; // маркер Or static double FixPrice; // переменная static bool Fix=false; // маркер klub2003 2021.02.28 08:35 #14000 Konstantin Nikitin:Declare globally Or So what should it look like to lock the price at the moment the MA is crossed? 1...139313941395139613971398139914001401140214031404140514061407...1965 New comment
Look at the Heiken Ashi indicator. It solves this problem somehow. Experiment... maybe it will work.
So far the issue has been resolved by OBJ_TREND
but don't like it when zooming in(
Look at the Heiken Ashi indicator. It solves this problem somehow. Experiment... maybe it will work.
Your tip was helpful, but alas it didn't work.
It's not good at scale either(
Your tip helped, but alas it didn't fit
At scale it's no good either(
What's wrong?
What's wrong?
Visually bad
Hi all!
Here's the problem:
Price crosses the MA down or up.
I need to memorise it in order to use it later in calculating the number of points passed.
This is how I understand it:
double FixPrice; // variable
bool Fix=false; // marker
if ( Fix==false) {
if ( Close[0] > MA_lo ) FixPrice = Close[0];
} // measure until the price crosses the MA
if ( Close[0] < MA_lo ) Fix=true;
if ( Fix==true) FixPrice_L = FixPrice ;
And here is the next hitch - the price is not memorized!
Hello all!
only on the screenshot Close is no less than MA
Hi all!
Here's the problem:
Price crosses the MA down or up.
I need to memorise it in order to use it later in calculating the number of points passed.
This is how I understand it:
double FixPrice; // variable
bool Fix=false; // marker
if ( Fix==false) {
if ( Close[0] > MA_lo ) FixPrice = Close[0];
} // measure until the price crosses the MA
if ( Close[0] < MA_lo ) Fix=true;
if ( Fix==true) FixPrice_L = FixPrice ;
And here is the next hitch - the price is not memorized!
Declare globally
Or
Declare globally
Or