How is this physically possible?

 

I have only programmed the properties for each line, but yet somehow when I attach the indicator to the chart, I get a red and a blue line running across the chart, mimicking that of the Kijunsen and Tenkansen. How on earth is this possible? I am using the latest compiled version but somehow the lines still appear (see code and below image), any thoughts?

//+------------------------------------------------------------------+
//|                                                       Lines.mq5 |
//|                        Copyright 2018, MetaQuotes Software Corp. |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2018, MetaQuotes Software Corp."
#property link      "https://www.mql5.com"
#property version   "1.00"
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_plots 2
// Line 1
#property indicator_label1 "Line 1" 
#property indicator_color1 Blue  
#property indicator_width1 1
#property indicator_type1  DRAW_LINE 
#property indicator_style1 STYLE_SOLID
// Line 2
#property indicator_label2 "Line 2"
#property indicator_color2 Red
#property indicator_width2 1
#property indicator_type2  DRAW_LINE  
#property indicator_style2 STYLE_SOLID
//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+------------------------------------------------------------------+


 

The Ghost in the machine.

Have you tried trading it ?

 
calioranged:

I have only programmed the properties for each line, but yet somehow when I attach the indicator to the chart, I get a red and a blue line running across the chart, mimicking that of the Kijunsen and Tenkansen. How on earth is this possible? I am using the latest compiled version but somehow the lines still appear (see code and below image), any thoughts?


Not possible, you have an other code that draws these lines.
 
Alain Verleyen:
Not possible, you have an other code that draws these lines

The code I am using is exactly as it has been posted above. 

The program I am attaching is 100% definitley the one I have posted above. 

There is literally no code in the program apart from the properties

How can another program be interfering if I haven't given it any instruction to do so?

I have even uninstalled and reinstalled MT5, same situation occurs, but with lines in totally random places.
 
calioranged:

The code I am using is exactly as it has been posted above. 

The program I am attaching is 100% definitley the one I have posted above. 

There is literally no code in the program apart from the properties

Ok if you believe in fairy tales, no problem for me.
 
Alain Verleyen:
Ok if you believe in fairy tales, no problem for me.

Below is a print screen of me compiling the exact program posted above (I took out the #property copyright and #property link so that I could fit the print screen on one page)


Below is a print screen of me attaching the program to the chart


Below is a print screen of the program attached to the chart.


As you can see, two totally random vertical lines appear on the chart, (like I said it just prints random lines each time I compile).


This is certainly not my version of a fairy tale and I am not a liar, not that there would even be any point in me lying about this.  

Something is obviously going seriosuly wrong but I can 100% gaurentee you that everything I have posted on this thread happened exactly as I said it did.

 
calioranged:

Below is a print screen of me compiling the exact program posted above (I took out the #property copyright and #property link so that I could fit the print screen on one page)


Below is a print screen of me attaching the program to the chart

Below is a print screen of the program attached to the chart.


As you can see, two totally random vertical lines appear on the chart, (like I said it just prints random lines each time I compile).


This is certainly not my version of a fairy tale and I am not a liar, not that there would even be any point in me lying about this.  

Something is obviously going seriosuly wrong but I can 100% gaurentee you that everything I have posted on this thread happened exactly as I said it did.

Ok sorry, in you first answer you didn't say it was random.

Are you the same person using the account "koranged" ? If yes, why using 2 accounts ?


I tried your code and can't reproduce this problem. However there is always an explanation. Which MT5 build are you using ?

Is there any other EA or indicator attached to this chart ?

If you close MT5 and restart, are these lines still present ?

If you detach the indicator from the chart, the lines remain or disappear ?

 
Alain Verleyen:

Ok sorry, in you first answer you didn't say it was random.

I said so here in my first reply:

calioranged:
I have even uninstalled and reinstalled MT5, same situation occurs, but with lines in totally random places.

But no problem. 

Alain Verleyen:

Are you the same person using the account "koranged" ? If yes, why using 2 accounts ?

I posted this morning on the koranged account, and then when I tried to make this post I was hit with a message along the lines of 'you can only post every two hours' despite the fact that my post was five hours before this one. So I used this account purely for this question (sorry but this issue has been driving me crazy I had to make a post)

Alain Verleyen:

I tried your code and can't reproduce this problem. However there is always an explanation. Which MT5 build are you using ?

Is there any other EA or indicator attached to this chart ?

If you close MT5 and restart, are these lines still present ?

If you detach the indicator from the chart, the lines remain or disappear ?

I'm using 1940. 

I don't have anything else attached at the minute but I have tried whilst something else is attached and the same problem would occur... just totally random lines each time.

After detaching the indicator, the lines were disappearing. 

It seems to be working okay right now, I am absolutely clueless as to what was causing the problem.

 

Now the problem is reoccurring!

I closed MT5 and then reloaded, and the lines reappeared... in totally different places.

I have also just typed out another blank custom indicator that only has the properties included, exactly the same problem with this program too, here is a screenshot:


 
calioranged:

I said so here in my first reply:

Not when I see it, you edited after I replied (see above). Anyway...

But no problem. 

I posted this morning on the koranged account, and then when I tried to make this post I was hit with a message along the lines of 'you can only post every two hours' despite the fact that my post was five hours before this one. So I used this account purely for this question (sorry but this issue has been driving me crazy I had to make a post)

Please avoid using 2 accounts. It doesn't help to trust someone.

I'm using 1940. 

You could try the last beta (1945).

I don't have anything else attached at the minute but I have tried whilst something else is attached and the same problem would occur... just totally random lines each time.

After detaching the indicator, the lines were disappearing. 

So that means the lines were effectively drawn by this indicator. 

It seems to be working okay right now, I am absolutely clueless as to what was causing the problem.

---------------------------------------------------------------------------

EDIT: Now the problem is occuring again:

I closed MT5 and then reloaded, and the lines reappeared... in totally different places.

Clearly a bug...seems the fairy tales are really existing ;-)

 
Alain Verleyen:
Not when I see it, you edited after I replied (see above). Anyway... Please avoid using 2 accounts. It doesn't help to trust someone.

Okay, my apologies.

Alain Verleyen:

You could try the last beta (1945).

So that means the lines were effectively drawn by this indicator. 

Clearly a bug...seems the fairy tales are really existing ;-)

I have tried this with 3 different custom indicators that have no code inside OnCalculate and the problem happens with all three.

Where can I download 1945?
Reason: