MT5 Programming/conversion - page 8

 
carbonmimetic:
Hello Mladen, here I am another time.....I need conversion for this very simple indicator..thank's in advance

carbonmimetic

This is a straight forward conversion (the only change is that now it is made sure that it really measures the distance in pips and not in points even on 5 digit brokers)

 

Is anybody using metatrader 5 on a real account?

 
mladen:
carbonmimetic This is a straight forward conversion (the only change is that now it is made sure that it really measures the distance in pips and not in points even on 5 digit brokers)

Great Mladen...you are the best!

 
nbtrading:
Is anybody using metatrader 5 on a real account?

Yes...I use it.....I use it only to trade....I use all my indicators on mt4

 
carbonmimetic:
Great Mladen...you are the best!

Sorry Mladen,

when I delet HL alert,it always appears line and I can't delete it

 
carbonmimetic:
Sorry Mladen, when I delet HL alert,it always appears line and I can't delete it

carbonmimetic

If you wish to create the line manually, comment out (or delete) these two lines (it was the same in the metatrader 4 version too)

if (ObjectFind(0,LineName)<0)

ObjectCreate(0,LineName, OBJ_HLINE, 0, 0, bid);

 
mladen:
carbonmimetic

If you wish to create the line manually, comment out (or delete) these two lines (it was the same in the metatrader 4 version too)

if (ObjectFind(0,LineName)<0)

ObjectCreate(0,LineName, OBJ_HLINE, 0, 0, bid);

in mt5 when I put HL ALERT there is an orizontal line and when price reaches it....there is alert sound and it is ok (like in mt4).

BUT in mt5 when I want delete it...I can't....always appears horizontal line....in mt4 I can delete it.

p.s. Merry Christmas and a VERY BIG SINCERE THANK YOU for all your great work and help.

 
carbonmimetic:
in mt5 when I put HL ALERT there is an orizontal line and when price reaches it....there is alert sound and it is ok (like in mt4).

BUT in mt5 when I want delete it...I can't....always appears horizontal line....in mt4 I can delete it.

p.s. Merry Christmas and a VERY BIG SINCERE THANK YOU for all your great work and help.

carbonmimetic

Metatrader 5 has one option that metatrader 4 does not have. It is the "dDisble select" property and it seems that if not explicitly specified otherwise, the default is to disable selection. Here is a version that sets that to selectable and added an option if the indicator should create the horizontal line at all

 
mladen:
carbonmimetic Metatrader 5 has one option that metatrader 4 does not have. It is the "dDisble select" property and it seems that if not explicitly specified otherwise, the default is to disable selection. Here is a version that sets that to selectable and added an option if the indicator should create the horizontal line at all

I can't drag and drop this alert line (in mt4 I can....I can move this line at price I want to play alert)

 
carbonmimetic:
I can't drag and drop this alert line (in mt4 I can....I can move this line at price I want to play alert)

When creating a horizontal line in metatrader 5 (or any object) if you want to be able to select the object make sure that the "disable selection" is not checked (see the picture for explanation). Once when it is un-checked you can select the object the same way as in metatrader 4 and then move it (or anything else) exactly the same way as in metatrader 4