Zigzag
Zigzag

 

Publi

Resultados 1 al 2 de 2

Tema: Zigzag

  1. #1
    ¿Alguien puede decirme cómo poner un zig zag en los indicadores en MT 4? ¿lo aprecio? Gracias.

  2.                         
    Publicidad
  3. #2
    Hola,

    ¿Alguien puede decirme, por qué el Stoploss (_low [shift]) no funciona?
    cuando lo hago como indicador ... el _high [shift] y el low [shift] funcionan bien ... pero en el experto no ... y si (Bid gt; = _high [i]) no funcionan correctamente

    Gracias

    Código insertado/ --------------------------------------------- --------------------- /| .mq4 |/| Copyright © 2005-2007, MetaQuotes Software Corp. |/| http://www.metaquotes.net/|/ ----------------------------------------------- ------------------- #property copyright Copyright © 2007, MetaQuotes Software Corp. # enlace a la propiedad http://www.metaquotes.net/extern double Lots = 0.1; Extern double TrailingStop = 30;/---- parámetros del indicador extern int ExtDepth = 12; extern int ExtDeviation = 5; extern int ExtBackstep = 3;/---- tampones de indicadores double Buffer # 91; # 93 ;; double HighMapBuffer # 91; # 93 ;; Double LowMapBuffer # 91; # 93 ;; double _high # 91; # 93 ;; double _low # 91; # 93 ;; doble lasthigh; doble último; nivel int = 3;/profundidad del recuento bool downloadhistory = false;/ ----------------------------------------------- ------------------- /| Función de inicialización del indicador personalizado |/ ----------------------------------------------- ------------------- int init () {IndiorBuffers (7);/---- configuración de dibujo/SetIndexStyle (0, DRAW_SECTION);/SetIndexStyle (3, DRAW_LINE);/---- index buffers mapping SetIndexBuffer (0, Buffer); SetIndexBuffer (1, HighMapBuffer); SetIndexBuffer (2, LowMapBuffer); SetIndexBuffer (3, lasthigh); SetIndexBuffer (4, último); SetIndexBuffer (5, _high); SetIndexBuffer (6, _low); SetIndexEmptyValue (0,0.0);/---- Indicador corto nombre IndiorShortName (ZigZag ( ExtDepth , ExtDeviation , ExtBackstep ));/---- inicialización realizada return (0); }/ ---------------------------------------------- -------------------- /| |/ ----------------------------------------------- ------------------- int start () {int i, counted_bars = IndiorCounted (); int límite, counterZ, whatlookfor; int shift, back, lasthighpos, lastlowpos; doble val, res; doble curlow, curhigh; int cnt, ticket, total; if (counted_bars == 0* downloadhistory *)/se descargó el historial {ArrayInitialize (Buffer, 0.0); ArrayInitialize (HighMapBuffer, 0.0); ArrayInitialize (LowMapBuffer, 0.0); } if (counted_bars == 0) {limit = Bars-ExtDepth; downloadhistory = verdadero; } if (counted_barsgt; 0) {while (counterZlt; level ilt; 100) {res = Buffer # 91; i # 93 ;; if (res! = 0) counterZ ; i ; } yo--; límite = i; if (LowMapBuffer # 91; i # 93;! = 0) {curlow = LowMapBuffer # 91; i # 93 ;; whatlookfor = 1; } else {curhigh = HighMapBuffer # 91; i # 93 ;; whatlookfor = -1; } for (i = limit-1; igt; = 0; i--) {Buffer # 91; i # 93; = 0.0; LowMapBuffer # 91; i # 93; = 0.0; HighMapBuffer # 91; i # 93; = 0.0; }} for (shift = limit; shiftgt; = 0; shift--){val = Low # 91; iLowest (NULL, 0, MODE_LOW, ExtDepth, shift) # 93 ;; if (val == lastlow) val = 0.0; else {lastlow = val; if ((Low # 91; shift # 93; -val) gt; (ExtDeviation * Point)) val = 0.0; else {for (back = 1; backlt; = ExtBackstep; back ) {res = LowMapBuffer # 91; shift back # 93 ;; if ((res! = 0) (resgt; val)) LowMapBuffer # 91; shift back # 93; = 0.0; }}} if (Low # 91; shift # 93; == val) LowMapBuffer # 91; shift # 93; = val; en cambio, LowMapBuffer # 91; shift # 93; = 0.0;/--- high val = High # 91; iHighest (NULL, 0, MODE_HIGH, ExtDepth, shift) # 93 ;; if (val == lasthigh) val = 0.0; else {lasthigh = val; if ((val-High # 91; shift # 93;) gt; (ExtDeviation * Point)) val = 0.0; else {for (back = 1; backlt; = ExtBackstep; back ) {res = HighMapBuffer # 91; shift back # 93 ;; if ((res! = 0) (reslt; val)) HighMapBuffer # 91; shift back # 93; = 0.0; }}} if (Alto # 91; cambio # 93; == val) HighMapBuffer # 91; shift # 93; = val; else HighMapBuffer # 91; shift # 93; = 0.0; }/corte final if (whatlookfor == 0) {lastlow = 0; lasthigh = 0; } else {lastlow = curlow; lasthigh = curhigh; } for (shift = limit; shiftgt; = 0; shift--) {res = 0.0; switch (whatlookfor) {caso 0:/busca pico o césped if (lastlow == 0 lasthigh == 0) {if (HighMapBuffer # 91; shift # 93;! = 0) {lasthigh = High # 91; shift # 93 ;; lasthighpos = cambio; whatlookfor = -1; Buffer # 91; shift # 93; = lasthigh; res = 1; } if (LowMapBuffer # 91; shift # 93;! = 0) {lastlow = Low # 91; shift # 93 ;; lastlowpos = cambio; whatlookfor = 1; Buffer # 91; shift # 93; = lastlow; res = 1; } } descanso; caso 1:/buscar pico si (LowMapBuffer # 91; shift # 93;! = 0.0 LowMapBuffer # 91; shift # 93; lt; lastlow HighMapBuffer # 91; shift # 93; == 0.0) {Buffer # 91; lastlowpos # 93; = 0.0; lastlowpos = cambio; lastlow = LowMapBuffer # 91; shift # 93 ;; Buffer # 91; shift # 93; = lastlow; res = 1; } if (HighMapBuffer # 91; shift # 93;! = 0.0 LowMapBuffer # 91; shift # 93; == 0.0) {lasthigh = HighMapBuffer # 91; shift # 93 ;; lasthighpos = cambio; Buffer # 91; shift # 93; = lasthigh; whatlookfor = -1; res = 1; } descanso; caso -1:/busque césped si (HighMapBuffer # 91; shift # 93;! = 0.0 HighMapBuffer # 91; shift # 93; gt; lasthigh LowMapBuffer # 91; shift # 93; == 0.0){Buffer # 91; lasthighpos # 93; = 0.0; lasthighpos = cambio; lasthigh = HighMapBuffer # 91; shift # 93 ;; Buffer # 91; shift # 93; = lasthigh; } if (LowMapBuffer # 91; shift # 93;! = 0.0 HighMapBuffer # 91; shift # 93; == 0.0) {lastlow = LowMapBuffer # 91; shift # 93 ;; lastlowpos = cambio; Buffer # 91; shift # 93; = lastlow; whatlookfor = 1; } descanso; predeterminado: retorno; }/switch (whatlookfor)}/for (shift = limit; shiftgt; = 0; shift--) total = OrdersTotal (); if (totallt; 1) {_high # 91; i # 93; = lasthigh; _low # 91; i # 93; = lastlow; if (Bid gt; = _high # 91; i # 93;) OrderSend (Symbol (), OP_BUY, Lots, Ask, 3, _low # 91; i # 93;, 0, Long, 1,0, Green); else if (Bid lt; = _low # 91; shift # 93;) OrderSend (Symbol (), OP_SELL, Lots, Bid, 3,0,0, Short, 1,0, Red); } return (0); }/ ---------------------------------------------- --------------------

Permisos de publicación

  • No puedes crear nuevos temas
  • No puedes responder temas
  • No puedes subir archivos adjuntos
  • No puedes editar tus mensajes
  •  
Uso de cookies
Utilizamos cookies propias y de terceros para elaborar información estadística y mostrarle publicidad personalizada a través del análisis de su navegación. Si continúa navegando acepta su uso. Más información y política de cookies.
     

Aviso legal: Ni forosforex.com ni ninguna persona involucrada en forosforex.com aceptarán ninguna responsabilidad por cualquier pérdida o daño en el trading como resultado de la confianza en la información contenida en este sitio web, incluidos datos, cotizaciones, gráficos y señales de compra/venta. Por favor, infórmese plenamente de los riesgos y costes asociados a las operaciones en los mercados financieros, una de las formas de inversión que más riesgos entrañan.
forosforex.com le quiere recordar que los datos contenidos en este sitio web no son necesariamente en tiempo real ni exactos. forosforex.com no asume responsabilidad alguna por las pérdidas en que usted podría incurrir como resultado de la utilización de estos datos. Este acuerdo se rige por su versión en inglés, que prevalecerá siempre que haya alguna discrepancia entre la versión en inglés y la versión en español. Los CFD son un producto difícil de entender, varios organismos reguladores consideran que no es adecuado para inversores minoristas debido a su complejidad y riesgo.
Advertencia de riesgo: Los CFDs son un producto difícil de entender, y puede no ser adecuado para inversores minoristas debido a su complejidad y riesgo. Existe la posibilidad de sufrir una pérdida igual o superior a la inversión. Por lo tanto, no debe invertir o arriesgar dinero que no pueda permitirse perder. Debe asegurarse de que comprende todos los riesgos. Antes de abrir una cuenta en un broker por favor sea consciente e infórmese de los riesgos asociados con el trading. El contenido de este sitio web no debe interpretarse como asesoramiento personal. ForosForex recomienda que busque el consejo de un asesor financiero independiente.