Please fix this indicator or EA - page 20

 

Help please!!!!!!

Please help!! I am not a coder, But Im trying my very best here. Any advice on why my indicator wont work would be much appreciated!!

Thank you in advancemarius_osma.mq4

Files:
 

Hi Guys, just finished writing a small ea for testing purpose of a strategie of myself. Just one quick question:

i would like the ea to calculate the average daily range of the symbol for the last, say 5 days.

just like it is displayed here: Forex Volatility - Mataf.net

is there a way to do this? thanks a lot in advance

 

How to set MA shortname in chart window

Hello

I am using 5 numbers of SMA in H4 TF. When I look at my chart I cant remember which one is what . I always touch with mouse pointer to know their value. I think it will be very handy if I can put their shortname with same color at somewhere around MA indi. I dont know how to set in program bcos my MQL4 knowledge is very poor and I will appreciate if somebody modify Moving Average Indi.

1,000,000 thanks

mithetnme

 

Please advice me

Hello

I want to display MA indi shortname and tried to modify MA custom indicator as follow. But I know only " ObjectCreate "command & it shows at one corner of chart window . Please advice me how to show shortname beside of MA and moving together with it.

#property indicator_chart_window

#property indicator_buffers 1

#property indicator_color1 Red

//---- indicator parameters

extern int MA_Period=13;

extern int MA_Shift=0;

extern string Method_1= "0=SMA, 1=EMA, 2=SMMA, 3=LWMA";

extern int MA_Method=0;

extern color Shortname_color = Red;

//---- indicator buffers

double mnmMA[];

//----

int ExtCountedBars=0;

//+------------------------------------------------------------------+

//| Custom indicator initialization function |

//+------------------------------------------------------------------+

int init()

{

int draw_begin;

string short_name;

//---- drawing settings

SetIndexStyle(0,DRAW_LINE);

SetIndexShift(0,MA_Shift);

IndicatorDigits(MarketInfo(Symbol(),MODE_DIGITS));

if(MA_Period<2) MA_Period=13;

draw_begin=MA_Period-1;

//---- indicator short name

switch(MA_Method)

{

case 1 : short_name="EMA("; draw_begin=0; break;

case 2 : short_name="SMMA("; break;

case 3 : short_name="LWMA("; break;

default :

MA_Method=0;

short_name="SMA(";

}

IndicatorShortName(short_name+MA_Period+")");

SetIndexDrawBegin(0,draw_begin);

//---- indicator buffers mapping

SetIndexBuffer(0,mnmMA);

//---- initialization done

return(0);

}

//+------------------------------------------------------------------+

//| |

//+------------------------------------------------------------------+

int deinit()

{

ObjectsDeleteAll(0,OBJ_LABEL);

return(0);

}

//--------------------------------------------------------------------

int start()

{

if(Bars<=MA_Period) return(0);

ExtCountedBars=IndicatorCounted();

//---- check for possible errors

if (ExtCountedBars<0) return(-1);

//---- last counted bar will be recounted

if (ExtCountedBars>0) ExtCountedBars--;

//----

int limit;

string shortname;

int counted_bars=IndicatorCounted();

//---- last counted bar will be recounted

if(counted_bars>0) counted_bars--;

limit=Bars-counted_bars;

//---- macd counted in the 1-st buffer

for(int i=0; i<limit; i++)

mnmMA=iMA(NULL,0,MA_Period,MA_Shift,MA_Method,PRICE_CLOSE,i);

if (MA_Method == 0) shortname = "SMA" + MA_Period;

if (MA_Method == 1) shortname = "EMA" + MA_Period;

if (MA_Method == 2) shortname = "SMMA" + MA_Period;

if (MA_Method == 3) shortname = "LWMA" + MA_Period;

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

ObjectSetText("tmp", shortname, 20, "Arial Bold", Shortname_color);

ObjectSet("tmp", OBJPROP_CORNER, 1);

ObjectSet("tmp", OBJPROP_XDISTANCE, 10);

ObjectSet("tmp", OBJPROP_YDISTANCE, 5);

//---- done

return(0);

}

1,000,000 thanks

mithetnme

Files:
ma_label.png  13 kb
 

A little help...new indicator...

I have created, for almost all indicators, a derivative that draws a color histogram (calling them all "Diamond + The name of the indicator / oscillator), instead of the common line (eg RSI). So when the RSI is over 50 will see a BLUE hist and when the RSI is below 50 I will see a RED one. No big deal ... but when I scalp is easier to see a color instead of a line that crosses another.

Now, my problem is that by the "BollingerBand% b" can not get the desired effect when it falls below 0.5 or rises above 0.5 ....it reminds me a constant error message and my ignorance of the MetaEditor not allow me to correct it.

Could you help me?

Thanks ...

"Il Diamante RSI" (working) MEGAUPLOAD - The leading online storage and file delivery service

"Bollinger band % b" (working) MEGAUPLOAD - The leading online storage and file delivery service

"Il Diamante BBpB" (not working) MEGAUPLOAD - The leading online storage and file delivery service

 
Files:
 

help

hello, can somebody help me make the candle as a background?

Files:
all_ma.mq4  13 kb
 

help for ea

hi all,

i am learning mql4 but i have some problems and i need help for ea code.

1. my system is

buy=close>50sma

sell=close<50sma

takeprofit=30

but my ea is opening new position after take profit because price>50sma

2.i want to open three positions. 2 positions for take profit 1 position for price crossover sma

if somebody help me i be hapy.

thanks for help.

 

Need Bid/Ask Delta Indicator

Hello. I got this indicator that shows a histogram of the delta bid/ask. It takes the info from the cme website from the currency futures. Only problem is it doesnt work cause you need a login. If someone can edit the indicator so you dont need to login or have somthing similar I would appreciate it. Thanks.

Files:
 

Modofication needed! Please help...

could anyone please help me with a script? i have a "stop and reverse" script for mt4 and i don't know how to modify it, so that when i use it, it would close current position and open an opposite one BUT WITH BIGGER LOT... In other words i need it to "close and reverse" with specific 1.667 bigger lot that last used.

Thank You in advance!

Files: