[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 313
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
Can you tell me what could be causing this glitch?
It works, works, everything is fine, then suddenly, all of a sudden :-(
And, not just dots are drawn where they should not be, but the data window also shows incorrect data (pertinent to the location of the dots)
(The indicator shows extrema, I wrote it myself )
After "rewinding" of a timeframe everything becomes normal
Maybe you know where to "dig". Or maybe there is such a topic on the forum.
Thanks in advance!
Write a proper indicator and the problems will disappear
Write a proper indicator and the problems will disappear
How do you mean by normal? If I knew that, I would not be asking questions here.
By the way, the Fractals indicator that I downloaded in MQL "does the same thing".
https://www.mql5.com/ru/code/7982
So it's not written correctly either?
Can you tell me what could be causing this glitch?
It works, works, everything is fine, then suddenly, all of a sudden :-(
And, not just dots are drawn where they should not be, but the data window also shows incorrect data (pertinent to the location of the dots)
(The indicator shows extrema, I wrote it myself )
After "rewinding" of a timeframe everything becomes normal
Maybe you know where to "dig". Or maybe there already is a topic on the forum.
Thanks in advance!
I was writing a similar one, it happened the same as yours. I have noticed, if indicator is calculated longer than one tick, there is no doubling. Add a heavier condition or sleep. But I am not a programmer, just an observation.
Didn't quite get it. maybe "calculates on more than 1 bar?"
Remembered Fractals (MQL4) / I reworked it to start counting from bar 3. I.e. 2 bars should end after it,
In the original indicator, it used to draw a "point"...I think it was on bar #2...(i.e. zero bar was also considered)
But if this point was broken before 2 bars, it stayed there...
and it turned out that there were no two bars lower on the right, while the upper fractal was drawn.
Built in fractals removes by the way...
Ok... I'll think about it.
Add a heavier condition or sleep.
How do I make the MA count one for high and one for low?
MA_1_t=iMA(NULL,0,Period_MA_1,0,MODE_LWMA,PRICE_TYPICAL,0); // MA_1
MA_2_t=iMA(NULL,0,Period_MA_2,0,MODE_LWMA,PRICE_TYPICAL,0); // MA_2
MA_3_t=iMA(NULL,0,Period_MA_3,0,MODE_LWMA,PRICE_TYPICAL,0); // MA_3
if (MA_2_t > MA_3_t + Rastvor*Point) // If difference between
{ // .MA_2_t + Rastvor*Point { .MA 2 and 3 large
Opn_B=true; // Open Buy Criterion
Cls_S=true; // Close Sell Criterion } (MA_2_t + Rastvor*Point) if (MA_2_t > MA_3PICAL) Sell
}
if (MA_1_t < MA_3_t - Rastvor*Point) // If difference between
{ // ..MA 1 and 3 is big
Opn_S=true; // Criterion open Sell
Cls_B=true; // Criterion closed Buy Cls_B=true; // Criterion closed Sell } } Sell only // MA 1 and 3 is big. Buy
}
I want MA_1 to be set to High and MA2 to be set to Low
MA_2 be set to Low
MA_3 must be set as Close
And how to set all moves to be SMA
How do I make the MA count one for high and one for low?
MA_1_t=iMA(NULL,0,Period_MA_1,0,MODE_LWMA,PRICE_TYPICAL,0); // MA_1
MA_2_t=iMA(NULL,0,Period_MA_2,0,MODE_LWMA,PRICE_TYPICAL,0); // MA_2
MA_3_t=iMA(NULL,0,Period_MA_3,0,MODE_LWMA,PRICE_TYPICAL,0); // MA_3
if (MA_2_t > MA_3_t + Rastvor*Point) // if difference between
{ // ...MA_2 and 3 is large
Opn_B=true; // Open Buy criterion
Cls_S=true; // Close criterion Sell
}
if (MA_1_t < MA_3_t - Rastvor*Point) // If difference between
{ // ...MA_1 and 3 is large
Opn_S=true; //open Sell criterion
Cls_B=true; //Click criteria Buy
}
I want MA_1 to be set to High and MA2 to be set to Low
MA_2 be set to Low
MA_3 must be set as Close
And how to make all zones to be SMA
All the answers are in there
All the answers are in there.
Folks, your help is needed.
There are trading conditions, defined as: Buy if %D line of stochastics crosses 30, the previous bar should be lower than 29 (so the bar crosses from bottom to top). In the tester I set a short time frame on an hourly timeframe to count the number of signals manually and compare it with the EA's readings. I should get 6 signals, but the EA just displays a wall of text with buy signals, and ideally there should only be 6.
Here is the code of Expert Advisor, may be someone can tell me what I am doing wrong?
Can you tell me what could be causing this glitch?
It works, works, everything is fine, then suddenly, all of a sudden :-(
And, not just dots are drawn where they should not be, but the data window also shows incorrect data (pertinent to the location of the dots)
(The indicator shows extrema, I wrote it myself )
After "rewinding" of a timeframe everything becomes normal
Maybe you can advise which way to "dig". Or maybe there already is a topic on the forum.
Thanks in advance!
Everything before you has already been stolen - it's like MasterForex version 5... There is also version 4, but I can't find it yet, if you need it I will find it.