Spread & Stop Loss indicator.

 

Hello,

Can you help me, please to change in this indicator the code in order to move labels from left upper corner to right upper corner ?

This indi shows me present spread and stop loss of my Broker.

Pucio

Files:
 
Pucio:
Hello,

Can you help me, please to change in this indicator the code in order to move labels from left upper corner to right upper corner ?

This indi shows me present spread and stop loss of my Broker.

Pucio

These aren't "labels" but "comments". Comments can't be moved as the only place where they are displayed is top left corner. The coding must be modified to display Labels instead of comments.

FerruFx

 
Pucio:
Hello,

Can you help me, please to change in this indicator the code in order to move labels from left upper corner to right upper corner ?

This indi shows me present spread and stop loss of my Broker.

Pucio

This is a quick fix just alter the distance between the " " gap=" <alter this distance> "; to shift the comments

spreadampstoploss.mq4

Files:
 
cja:
This is a quick fix just alter the distance between the " " gap=" <alter this distance> "; to shift the comments spreadampstoploss.mq4

I don't need the indicator ..

But I must say that you are a very nice person .. Always willing to help ..

Files:
applause.gif  2 kb
 

Cja,

Thank you

I added Alert to this indi, just small contribution,

Pucio

Files:
 
cja:
This is a quick fix just alter the distance between the " " gap=" <alter this distance> "; to shift the comments spreadampstoploss.mq4

Yes it's a possibility but when you resize your window, the comments might disappear outside the chart.

FerruFx

 

Yes, Mladen wrote me that, comment can not be placed anywhere else but the left upper corner, that I need to create an object in order to make it be placeable anywhere. Something like this but I am not such a good coder :

void setObject(string name,string text,int x,int y,color theColor, string font = "Arial",int size=10,int angle=0)

{

string labelName = StringConcatenate(labelNames,name);

//

//

//

//

//

if (ObjectFind(labelName) == -1)

{

ObjectCreate(labelName,OBJ_LABEL,0,0,0);

ObjectSet(labelName,OBJPROP_CORNER,Corner);

if (angle != 0)

ObjectSet(labelName,OBJPROP_ANGLE,angle);

}

ObjectSet(labelName,OBJPROP_XDISTANCE,x);

ObjectSet(labelName,OBJPROP_YDISTANCE,y);

ObjectSetText(labelName,text,size,font,theColor);

}

 

Labels

Pucio:
Yes, Mladen wrote me that, comment can not be placed anywhere else but the left upper corner, that I need to create an object in order to make it be placeable anywhere. Something like this but I am not such a good coder :

void setObject(string name,string text,int x,int y,color theColor, string font = "Arial",int size=10,int angle=0)

{

string labelName = StringConcatenate(labelNames,name);

//

//

//

//

//

if (ObjectFind(labelName) == -1)

{

ObjectCreate(labelName,OBJ_LABEL,0,0,0);

ObjectSet(labelName,OBJPROP_CORNER,Corner);

if (angle != 0)

ObjectSet(labelName,OBJPROP_ANGLE,angle);

}

ObjectSet(labelName,OBJPROP_XDISTANCE,x);

ObjectSet(labelName,OBJPROP_YDISTANCE,y);

ObjectSetText(labelName,text,size,font,theColor);

}

This should do all you require, here are the new inputs

Normal_StopLoss = 5;

Normal_Spread = 2;

BarsShift_Side = 0;

BarsShift_UP_DN = 0;

Text_Size = 10;

Text_color = Gold;

Text_Font = "Arial";

CornerToUse = 1;

WindowToUse = 0;

Show_Alert = false;

Play_Sound = false;

spreadampstoploss_v1.ex4

Files:
 

Cja,

Thank you a lot for this version made by you. Great job. This indi really helps to monitor present spread and stop loss of the Broker in MT4. Credit to you, Cja.

If this is not a problem may you post this indi version also in in mql4 format, please ?

Regards

Pucio

 

Show_Alert = false;

Play_Sound = false;

Does not work as it should be. When Paly_Sound is false (Show_Alert = true at that time);Play Sound still rings.

 

Alerts

Pucio:
Show_Alert = false;

Play_Sound = false;

Does not work as it should be. When Paly_Sound is false (Show_Alert = true at that time);Play Sound still rings.

The standard popup window for MT4 still plays a sound even if you have a separate sound Alert on false if you still have the Alert sound enabled , to stop the popup Alert playing a sound you select the Tools input at the top of your chart.

I have also added in a separate input so that you can change the sound file for the sound Alert.

Tools / Options / Events / then double click on the Alert window and a Red cross will appear this will turn off the sound for the popup window.

spreadampstoploss_v1_1.ex4

Files:
Reason: