MA’s on the side

0
(0)
Nombre:
MA's on the side
Autor: bdeyes (2011.09.27 14:06)
descargado: 2519
Descargar:
MA's on the side 1
MA Segments.mq4 (37.7 Kb) Vista

Descripción:

Often times I find my chart is too cluttered with indicators to see the price action, however I still need those reference points.

My solution was to create an indicator which displays the current level of some of the MA's off to the side of the current candle.

Works on all time-frames except Weekly and Monthly. Can show MA's from other time-frames on current chart i.e. A diario 10 EMA on 15 gráfico mínimo. The indicator is attached, change it as you like. The code is commented well enough that I hope making changes should be fairly self-explanatory. (I have seen enough posts on here to know that everyone will probably want a different MA added - feel free to make you own changes.)

NOTA: Este es el "mejora" version of the indicator I erroneously placed in the Forum under the same title. Adds ability to toggle MA's on/off from the properties window and further internal commenting.

Imagen:

MA's on the side 2

4 comentarios Para publicar un nuevo comentario, por favor acceso o registro

Muchas gracias,

great idea !! it 's very useful !!

🙂

23.10.2011 12:13 ludo31

Will come back to look at this one as it is along the lines of something I want to do, es decir; I want to be able to display MAV values no matter what time frame I'm in - like show the daily200MAV and the 1hr200mav even if I'm in say the 5 gráfico mínimo

Will come back t it as I'm searching for something else atm........

12.10.2011 18:13 CanAm

good idee bad indicator
30.09.2011 17:05 wansiman


Man I love you guys.

I put in the original post that I didn't want to make MA changes for you, cause there's only like about a million different MA's combinations in MetaTrader (I'm sure I'm going to hear about that - I'm know someone on here has probably actually counted).

The post has been up less than a day and I have already had 3 requests for different MA's

Here's how you change the MA's - if you can type you can do this.

Open the mq4 file of the indicator in MetaEditor

Save the file under another name i.e. MA_Segments v2

Change the highlighted parts to match the MA you want to use. Replace the timeframe (PERIOD_D1) with one of these http://docs.mql4.com/constants/timeframes Replace the period (200) with whatever number you want. Replace the MA Method (MODE_SMA) with the one you want http://docs.mql4.com/constants/movings (Don't mess up the commas)

Change the red part of the variables to match your MA using this format MA_Timeframe_Period_MA Method

Change the green object names the same as you did the variables above. Note that the line and the label each have a name. (Don't mess up the double quotes)

Change the label text to match your MA.

Don't forget to change your comentarios también.

Click on Compile.

 

Gracias,

dave

PD: Now you're a programer too!!!

 

 

 

 

The variables are at the top...

extern bool MA_D1_200_SMA = true; // set true to display

These are further down...

int deinit()
{
    ObjetoEliminar("D1_200_SMA");

        }        

    // A diario 200 SMA línea Change your comments too
    si (MA_D1_200_SMA) // draw if true
    {
    // if there is an old line delete it...
    si (ObjectFind("D1_200_SMA") != -1) ObjetoEliminar("D1_200_SMA");
    // and draw a new one.
    Crear objeto("D1_200_SMA", OBJ_TREND, 0, Tiempo[0]+line_leader, iMA(NULO, PERIOD_D1,200,0,MODE_SMA,PRICE_CLOSE,0), (Tiempo[0]+line_length+line_adjustment), iMA(NULO, PERIOD_D1,200,0,MODE_SMA,PRICE_CLOSE,0));
    Conjunto de objetos("D1_200_SMA", OBJPROP_RAY, FALSO);
    Conjunto de objetos("D1_200_SMA", OBJPROP_TIME1, Tiempo[0]+line_leader);
    Conjunto de objetos("D1_200_SMA", OBJPROP_TIME2, (Tiempo[0]+line_length+line_adjustment));
    Conjunto de objetos("D1_200_SMA", OBJPROP_COLOR, Lime);
    }

    // A diario 200 SMA text label Change your comments too
    si (MA_D1_200_SMA) // draw if true
    {
    // if there is an old label delete it...
    si (ObjectFind("D1_200_SMA_label") != -1) ObjetoEliminar("D1_200_SMA_label");
    // and draw new one.
    Crear objeto("D1_200_SMA_label", OBJ_TEXT, 0, (Tiempo[0]+text_shift+text_adjustment), iMA(NULO, PERIOD_D1,200,0,MODE_SMA,PRICE_CLOSE,0));
    Conjunto de objetos("D1_200_SMA_label", OBJPROP_TIME1, (Tiempo[0]+text_shift+text_adjustment));
    Conjunto de objetos("D1_200_SMA_label", OBJPROP_COLOR, Lime);
    ObjetoConjuntoTexto("D1_200_SMA_label", "D1 200 SMA", font_size, "Arial", Lime); 
    }

¿De cuánta utilidad te ha parecido este contenido?

¡Haz clic en una estrella para puntuarlo!

Promedio de puntuación 0 / 5. Recuento de votos: 0

Hasta ahora, ¡no hay votos!. Sé el primero en puntuar este contenido.

¡Siento que este contenido no te haya sido útil!

¡Déjame mejorar este contenido!

Diez centavos, ¿cómo puedo mejorar este contenido?



Autor: Equipo Wiki de Forex
Somos un equipo de comerciantes de Forex altamente experimentados [2000-2023] que se dedican a vivir la vida en nuestros propios términos. Nuestro principal objetivo es lograr la independencia financiera y la libertad., y hemos buscado la autoeducación y adquirido una amplia experiencia en el mercado Forex como nuestro medio para lograr un estilo de vida autosostenible..