Coding help - page 49

 

Help indicator ...

Hello

Interested indicator there made ​​with this "idea" that I have?

What I like "idea" is realized in different ways, but many that I've tried so far no one is exactly what I am looking for ...

I'm looking for something like this ...

(I'll try to explain it, but English is not my native language and I'm a rookie in the Forex ...)

"Initial conditions":

- Time frame M5 (M1) - M15 up, but better for the first two time frames!;

- Only for Forex;

- It is best to be based on "a small time frame - great period and vice versa ..." (This may be clear, but still);

- No indicators with exotic names and "features"!;

Basically it comes to the following formulation:

1. ADX test for values ​​above 30 - it will prove that we are in Trend. This is a major milestone in my opinion and it is based on this indicator! If no Trend ie ADX <30 (25 I think this was the limit, but assuming 30 will be probably thinking ...)

If no Trend - is shown on the graph that "No Trend" and the "wait" to meet this condition before starting to show data! Here I am "open" to other proposals except ADX, to ensure 100% availability of the trend, but at least I can not think of one another safe in his testimony?

2. Have Trend (only if!) - It is recorded testimony of STO, MACD, CCI (these are a kind of "backup" if you're in range (consolidation). Addition, we will also participate and those that are used when a Trend : MA Mo, DMI, PAR SIO and Bollinger Band.

3. The result of all this is: Display the percentage of presence or absence of a trend. Only in rates without any subjective interpretations of tools!

In other words summary: Use many tools for Trend confirmed to participate in "voting" and simply counting "for" and "against" shown as a percentage, how many are "on" and how "anti".

Before anyone writes "it has many such or similar - with arrows, with glowing bands" and so I want to tell you that few things are important, and will complement the above conditions with some clarification:

-> MA: This is about the intersection of EMA50 and EMA200, but can be used (even if it's better) the intersection of three: EMA30, EMA 100 and EMA200. (I think that's selected will be good, but can anyone suggest and good times?)

-> STO a better (guaranteed) will give the result in limits: 15-85 instead of 20-80?

-> So show me indicators are nine in number, ie have one or three to add to get an even number, because otherwise in the "vote" will not give the correct answer! In this regard, there are some indicators that do not know Bear, Bulls, and Force Index DeMarker that might be good too, but it's nothing I can say ...

I think it's a good "idea" and hopefully someone to take seriously. It is not the Holy Grail, but I'm offended that it will be a good helper!

Many hope to be able and to convince you otherwise, namely that this is not the same as many others before him, because other indicators themselves instruments that help design and they are not properly "calibrated" and are standard values. They do not check for Trend?. Whether we have a range? Or someone trying to interpret the readings but who knows it is not right ... ?

My "idea" maybe not quite perfect setting indicators from participation in it, and they themselves could not have chosen better, which I hope will help me, but the "base" I think it is good and worth do something about it?

Course are available and many additional "extras" that can be scary as important:

- Check and display the presence of a range, (we have no idea how to prove it? Maybe some checking price movement in the price expressed interested is ...)

- Whether the trend is accelerating or weakened; (i know there is evidence of this instrument, but I can not give you an example ...)

- Whether to divergence or convergence price, (this is very important having in mind that the whole strategy is built on this ... I do not know how it can be implemented ...).

Attach an "example" of an indicator that there is something "like" on what I think. I am not the author, but a friend of mine, but he currently has declined from trading and want to do more with it: (. You can use some code or rework and very much hope someone young or another brilliant coder to evaluate my idea and help.

Thank you in advance! All good by me!

PP. Here's a sample setup but only somewhat ... DOX.bg - Файл организатор за лесно споделяне и съхранение на файлове

 

Internal error on indicator

I have downloaded "SR_MTF_Eli" indicator.

It works well but I have always the message " ArrayCopySeries function internal error.

What can I do to avoid the message ?

Thanks in advance.

Jo

#property indicator_chart_window

#property indicator_buffers 8

#property indicator_color8 SkyBlue

#property indicator_color7 Yellow

#property indicator_color6 CornflowerBlue

#property indicator_color5 DarkOrange

#property indicator_color4 RoyalBlue

#property indicator_color3 Sienna

#property indicator_color2 Blue

#property indicator_color1 Red

//---- buffers

double buf_up1D[];

double buf_down1D[];

double buf_up4H[];

double buf_down4H[];

double buf_up1H[];

double buf_down1H[];

double buf_up30M[];

double buf_down30M[];

extern int Period_1 = PERIOD_H1;

extern int Period_2 = PERIOD_M30;

extern int Period_3 = PERIOD_M15;

extern int Period_4 = PERIOD_M5;

extern bool display_Period_1 = true;

extern bool display_Period_2 = true;

extern bool display_Period_3 = true;

extern bool display_Period_4 = true;

extern bool Play_Sound = true;

int UniqueNum = 2284;

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

//| Custom indicator initialization function |

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

int init()

{

//---- indicators

int draw = DRAW_LINE; if (!display_Period_4||Period_4<Period()) draw = DRAW_NONE;

SetIndexStyle(6,DRAW_ARROW);

SetIndexArrow(6,169);

SetIndexStyle(7,DRAW_ARROW);

SetIndexArrow(7,169);

SetIndexBuffer(6,buf_up1D);

SetIndexBuffer(7,buf_down1D);

draw = DRAW_LINE; if (!display_Period_3||Period_3<Period()) draw = DRAW_NONE;

SetIndexStyle(4,DRAW_ARROW);

SetIndexArrow(4,170);

SetIndexStyle(5,DRAW_ARROW);

SetIndexArrow(5,170);

SetIndexBuffer(4,buf_up4H);

SetIndexBuffer(5,buf_down4H);

draw = DRAW_LINE; if (!display_Period_2||Period_2<Period()) draw = DRAW_NONE;

SetIndexStyle(2,DRAW_ARROW);

SetIndexArrow(2,171);

SetIndexStyle(3,DRAW_ARROW);

SetIndexArrow(3,171);

SetIndexBuffer(2,buf_up1H);

SetIndexBuffer(3,buf_down1H);

draw = DRAW_LINE; if (!display_Period_1||Period_1<Period()) draw = DRAW_NONE;

SetIndexStyle(0,DRAW_ARROW);

SetIndexArrow(0,172);

SetIndexStyle(1,DRAW_ARROW);

SetIndexArrow(1,172);

SetIndexBuffer(0,buf_up30M);

SetIndexBuffer(1,buf_down30M);

if (Period_1<Period())Period_1=Period();

if (Period_2<Period())Period_2=Period();

if (Period_3<Period())Period_3=Period();

if (Period_4<Period())Period_4=Period();

SetIndexLabel(0, tf2txt(Period_1)); SetIndexLabel(1, tf2txt(Period_1));

SetIndexLabel(2, tf2txt(Period_2)); SetIndexLabel(3, tf2txt(Period_2));

SetIndexLabel(4, tf2txt(Period_3)); SetIndexLabel(5, tf2txt(Period_3));

SetIndexLabel(6, tf2txt(Period_4)); SetIndexLabel(7, tf2txt(Period_4));

//----

return(0);

}

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

//| Custom indicator deinitialization function |

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

int deinit()

{

//----

//----

return(0);

}

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

//| Custom indicator iteration function |

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

int start()

{

int counted_bars=IndicatorCounted();

int i=0, y1d=0, y4h=0, y1h=0, y30m=0;

int limit=Bars-counted_bars +Period_1/Period();

double pd_1=0, pd_2=0, pd_3=0, pd_4=0;

double pu_1=0, pu_2=0, pu_3=0, pu_4=0;

datetime TimeArray_1D[] ,TimeArray_4H[], TimeArray_1H[], TimeArray_30M[];

//----

ArrayCopySeries(TimeArray_1D,MODE_TIME,Symbol(),Period_4);

ArrayCopySeries(TimeArray_4H,MODE_TIME,Symbol(),Period_3);

ArrayCopySeries(TimeArray_1H,MODE_TIME,Symbol(),Period_2);

ArrayCopySeries(TimeArray_30M,MODE_TIME,Symbol(),Period_1);

for(i=0, y1d=0, y4h=0, y1h=0, y30m=0;i<limit;i++)

{

if (Time<TimeArray_1D[y1d]) y1d++;

if (Time<TimeArray_4H[y4h]) y4h++;

if (Time<TimeArray_1H[y1h]) y1h++;

if (Time<TimeArray_30M[y30m]) y30m++;

double fh = iFractals( NULL, Period_4, MODE_HIGH, y1d);

buf_up1D = fh;

buf_down1D = iFractals( NULL, Period_4, MODE_LOW, y1d);

buf_up4H = iFractals ( NULL, Period_3, MODE_HIGH, y4h);

buf_down4H = iFractals( NULL, Period_3, MODE_LOW, y4h);

buf_up1H = iFractals( NULL, Period_2, MODE_HIGH, y1h);

buf_down1H = iFractals( NULL, Period_2, MODE_LOW, y1h);

buf_up30M = iFractals( NULL, Period_1, MODE_HIGH, y30m);

buf_down30M = iFractals( NULL, Period_1, MODE_LOW, y30m);

}

for (i=limit; i>=0; i--)

{

if ( buf_up1D == 0 ) buf_up1D = pu_1; else pu_1 = buf_up1D;

if ( buf_down1D == 0 ) buf_down1D = pd_1; else pd_1 = buf_down1D;

if ( buf_up4H == 0 ) buf_up4H = pu_2; else pu_2 = buf_up4H;

if ( buf_down4H == 0 ) buf_down4H = pd_2; else pd_2 = buf_down4H;

if ( buf_up1H == 0 ) buf_up1H = pu_3; else pu_3 = buf_up1H;

if ( buf_down1H == 0 ) buf_down1H = pd_3; else pd_3 = buf_down1H;

if ( buf_up30M == 0 ) buf_up30M = pu_4; else pu_4 = buf_up30M;

if ( buf_down30M == 0 ) buf_down30M = pd_4; else pd_4 = buf_down30M;

}

//----

return(0);

}

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

string tf2txt(int tf)

{

if (tf == PERIOD_M1) return("M1");

if (tf == PERIOD_M5) return("M5");

if (tf == PERIOD_M15) return("M15");

if (tf == PERIOD_M30) return("M30");

if (tf == PERIOD_H1) return("H1");

if (tf == PERIOD_H4) return("H4");

if (tf == PERIOD_D1) return("D1");

if (tf == PERIOD_W1) return("W1");

if (tf == PERIOD_MN1) return("MN1");

return("??");

}

 

Dear Moderators

Please delete my last 2 post.

 

Modify Indicator

Can anyone modify this indicator

I will change the timeframe and I will place it in a window!!

mbfx_system_alerts.ex4

Thanks

Files:
 
Nightlight1982:
Can anyone modify this indicator

I will change the timeframe and I will place it in a window!!

mbfx_system_alerts.ex4

Thanks

Hi Nightlight19823,

Will will need the original source code(mt4) to be able to modify it.

 

bar closed alert for HA standard?

I posted on the HAS alert thread here #11

I added alert to standard HA:heiken_ashi_alert01.mq4

but do not understand how to make it ping once at confirmation of bar closed to signal different colour bar

many thanks

Files:
 

Question

joselopezde:
Hi, I am a Spanish trader. First, I apologize for my bad English. I'll explain what I need. When I trade, I like having "overview of the day."

I attached chart to explain it better.

Strategy in for DAX. When start the day, we usually have a Gap, so previous day close and opening of this day are different

So, the indicator that I need:

1. Vertical line at 8:00

2. Two horizontal lines (opening day and previous day close).

  • Opening day (candle time 8:00).
  • Previous day close (candle time 21:45).
  • 3. Horizontal lines:

  • Today open + x points (e.g. + 20)
  • Today open + x points (e.g. + 40)
  • Yesterday close - x points (e.g. - 20)
  • Yesterday close - x poins (e.g. - 40)

Bye and thank's!

Hi folks, whats the name of this indicator?

 

Change please

Could someone change this indicator to show only one line (today) not for all days.

Files:
 
zigflip:
I posted on the HAS alert thread here #11

I added alert to standard HA:heiken_ashi_alert01.mq4

but do not understand how to make it ping once at confirmation of bar closed to signal different colour bar

many thanks

Hi Zigflip,

Have this cleaned up version of regular heiken ashi with alerts, maybe you can use this.

Files:
 

hi and thanks mr tools that looks good! checking the alert later