indicator for flags and pennant (mt5 version)

baraozemo

Trader
Dec 19, 2017
14
1
24
Brazil
Hi,

I started the conversion of the flag and pennat indicator for mt5, (free version for all)
i got the mt4 version and made a conversion, I think that 80% is working fine
but I need to fixes random lines that appear..

Enivid or another guy could help me to fix my mt5 conversion?

mt4 version (that is the base for my conversion , is working like in the chart below)
111qioi.jpg


and the mt5 version (convert) is display some errors lines, but is working (+-)
k3n04y.jpg
 

Attachments

  • flag_and_pennant(ok).mq4
    37.5 KB · Views: 107
  • flag_and_pennant.mq5
    38.1 KB · Views: 305

Enivid

Administrator
Staff member
Nov 30, 2008
18,534
1,355
144
Odesa
www.earnforex.com
Sorry, I don't have much time to look through this, but from what I see, these values are leaking into the indicator buffers somehow:
MQL5:
      double dmin=1000000.0;
      double dmax=-1000000.0;
You should check if there are some cases when these values would pass into buffers without actual calculation done for the values.

Also, I would change this:
MQL5:
   SetIndexBuffer(4,MedianBuffer);
to this:
MQL5:
   SetIndexBuffer(4,MedianBuffer, INDICATOR_CALCULATIONS);
As you don't want it plotted.
 

baraozemo

Trader
Dec 19, 2017
14
1
24
Brazil
still not working... lol

Sorry, I don't have much time to look through this, but from what I see, these values are leaking into the indicator buffers somehow:
MQL5:
      double dmin=1000000.0;
      double dmax=-1000000.0;
You should check if there are some cases when these values would pass into buffers without actual calculation done for the values.

Also, I would change this:
MQL5:
   SetIndexBuffer(4,MedianBuffer);
to this:
MQL5:
   SetIndexBuffer(4,MedianBuffer, INDICATOR_CALCULATIONS);
As you don't want it plotted.
 

Bitric

Newbie
Oct 18, 2019
9
1
2
25
hello admin,could you finish this project ?? it would be awesome if there's available flag &pennant mt5 version here
 
  • 👍
Reactions: sintia