Ask! - page 94

 
ANCOLL:
I wonder if there's a way to remove the banner, coz it sometimes block view from other indicator.

Too bad, it's .ex4

The indicator, I attached below

You can ask cja to make it smaller on this thread https://www.mql5.com/en/forum/178253

Why cja is posting ex4 codes only with banner - please read those 2 threads:

https://www.mql5.com/en/forum/178287

https://www.mql5.com/en/forum/177101

 
Michel:
It's easy: the code above is a function, so you need to call it somewhere. If you never call it, this function will never run, so it's useless to keep it in the compiled file; that's the meaning of the error you get.

I figured it out and got it working. Thank you.

 

Need to use Digits

Dave137:

#property indicator_chart_window

double spread=Ask-Bid;

{

ObjectCreate("Spread_Label", OBJ_LABEL, 0, 0, 0);

ObjectSetText("Spread_Label", DoubleToStr(spread,0), 14, "Ariel", Yellow);

ObjectSet("Spread_Label", OBJPROP_CORNER, 3);

ObjectSet("Spread_Label", OBJPROP_XDISTANCE, 50);

ObjectSet("Spread_Label", OBJPROP_YDISTANCE, 55);

}

I tried this but get a big '0' value on the graph. How do I get the indicator to place the spread on the graph of the currency it is being overlayed on?

Your wisdom and knowledge is needed!

Dave

Dave,

The problem is with this line of code.

ObjectSetText("Spread_Label", DoubleToStr(spread,0), 14, "Ariel", Yellow);

When using DoubleToStr the second option is rounding, ie how many decimal places to round to. In your case you are rounding a two or 4 decimal place number back to "Zero" decimal places.

See Below:

string DoubleToStr( double value, int digits)

Returns text string with the specified numerical value converted into a specified precision format.

Parameters:

value - Floating point value.

digits - Precision format, number of digits after decimal point (0-8).

The correct code should read:

ObjectSetText("Spread_Label", DoubleToStr(spread,Digits), 14, "Ariel", Yellow);

NOTE: Digits is an internal function that returns the number of decimal places for the current symbol.

This should now show you the Spread.

Cheers,

Hiachiever

 
ANCOLL:
I wonder if there's a way to remove the banner, coz it sometimes block view from other indicator.

Too bad, it's .ex4

The indicator, I attached below

Yes, I wrote and posted code so you can build your own meters.

 
newdigital:
You can ask cja to make it smaller on this thread https://www.mql5.com/en/forum/178253

Why cja is posting ex4 codes only with banner - please read those 2 threads:

https://www.mql5.com/en/forum/178287

https://www.mql5.com/en/forum/177101

I see..

Even the Dolly and DIN where I, cja, minime, and others have worked together, have been ripped and sell by those thieves on the net.

 

Problem with ICUSTOM

This is the error that I get when I run my EA

GannHiLov1 EURJPYm,M30: invalid index buffer number in iCustom function

this is my Icustom function

double GannBuy1 = iCustom(NULL, 0, "###gann_hilo_activator###", lookback1,0);

Does anyone know how to fix this?

 

For codersguru and others programmers

Hi all,

Please could you help me with my problem described here

Thanks

 

Continuous alert

I was wondering what code and where to add it, if I want any indicator to sound, email, alert until I shut it off. I'm away from my computer at times and use text messages and sound to alert me whether awake or asleep. One sound or text message is not always enough to get my attention.

Thank you ahead of time

 

adx voice alert

hello, I was wondering if anyone can help me make an indicator that will give me a sound once the adx line is above 40?

Thanks

 

iCustom at end of bar or?

Hi All,

I've been trying to confirm that the iCustom uses the values at the close of the bar or does it calculate it after every tick? It is not totally clear in the documentation. It seems that some functions like iMa allow you to specify at which time in the bar that you want the value to be taken.

I have the following iCustom and would like to know if it is the value of StochRSICurr at the end of the daily bar or not?

StochRSICurr = iCustom(Symbol(),PERIOD_D1,"Stochastic RSI",8,8,9,0,0);

Thanks for your help.

Putz

Reason: