Zygzak
Pokaż wyniki od 1 do 2 z 2

Wątek: Zygzak

  1. #1
    Cześć,

    Czy ktoś może mi powiedzieć, dlaczego Stoploss (_low [zmiana]) nie działa?
    kiedy robię to jako wskaźnik ... _wysoka [zmiana] i niska [zmiana] działają dobrze ... ale w eksperta nie ... i jeśli (oferta gt; = _wysoki [i]) nie działa poprawnie

    dzięki

    Wstawiony kod/ --------------------------------------------- --------------------- /| .mq4 |/| Prawa autorskie © 2005-2007, MetaQuotes Software Corp./| http://www.metaquotes.net/|/ ----------------------------------------------- ------------------- #property copyright Copyright © 2007, MetaQuotes Software Corp. link #property http://www.metaquotes.net/extern double Lots = 0.1; extern double TrailingStop = 30;/---- wskaźnik parametrów extern int ExtDepth = 12; extern int ExtDeviation = 5; extern int ExtBackstep = 3;/---- bufory wskaźnikowe podwójne Bufor # 91; # 93 ;; double HighMapBuffer # 91; # 93 ;; double LowMapBuffer # 91; # 93 ;; podwójny _ wysoki # 91; # 93 ;; double _low # 91; # 93 ;; podwójne lasthigh; double lastlow; int poziom = 3;/recounting's depth bool downloadhistory = false;/ ----------------------------------------------- ------------------- /| Funkcja inicjalizacji wskaźnika niestandardowego |/ ----------------------------------------------- ------------------- int init () {IndiorBuffers (7);/---- ustawienia rysunku/SetIndexStyle (0, DRAW_SECTION);/SetIndexStyle (3, DRAW_LINE);/---- Bufory wskaźników odwzorowują SetIndexBuffer (0, Bufor); SetIndexBuffer (1, HighMapBuffer); SetIndexBuffer (2, LowMapBuffer); SetIndexBuffer (3, lasthigh); SetIndexBuffer (4, lastlow); SetIndexBuffer (5, _high); SetIndexBuffer (6, _low); SetIndexEmptyValue (0,0.0);/---- krótka nazwa wskaźnika IndiorShortName (ZigZag ( ExtDepth , ExtDeviation , ExtBackstep ));/---- inicjalizacja wykonana return (0); }/ ---------------------------------------------- -------------------- /| |/ ----------------------------------------------- ------------------- int start () {int i, counted_bars = IndiorCounted (); int limit, counterZ, whatlookfor; int shift, back, lasthighpos, lastlowpos; double val, res; podwójny, curhigh; int cnt, bilet, suma; if (counted_bars == 0* downloadhistory *)/historia została pobrana {ArrayInitialize (Buffer, 0.0); ArrayInitialize (HighMapBuffer, 0.0); ArrayInitialize (LowMapBuffer, 0.0); } if (counted_bars == 0) {limit = Bars-ExtDepth; downloadhistory = true; } if (counted_barsgt; 0) {while (counterZlt; level ilt; 100) {res = Buffer # 91; i # 93 ;; if (res! = 0) counterZ ; i ; } ja--; limit = 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; }} dla (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; else 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 (High # 91; shift # 93; == val) HighMapBuffer # 91; shift # 93; = val; else HighMapBuffer # 91; shift # 93; = 0.0; }/końcowe cięcie, jeśli (whatlookfor == 0) {lastlow = 0; lasthigh = 0; } else {lastlow = curlow; lasthigh = curhigh; } for (shift = limit; shiftgt; = 0; shift--) {res = 0.0; switch (whatlookfor) {case 0:/szukaj pików lub trawników, jeśli (lastlow == 0 lasthigh == 0) {if (HighMapBuffer # 91; shift # 93;! = 0) {lasthigh = High # 91; shift # 93; lasthighpos = shift; whatlookfor = -1; Bufor # 91; shift # 93; = lasthigh; res = 1; } if (LowMapBuffer # 91; shift # 93;! = 0) {lastlow = Low # 91; shift # 93 ;; lastlowpos = shift; whatlookfor = 1; Bufor # 91; przesunięcie # 93; = lastlow; res = 1; } } przerwa; case 1:/szukaj wartości szczytowej, jeśli (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 = shift; lastlow = LowMapBuffer # 91; shift # 93 ;; Bufor # 91; przesunięcie # 93; = lastlow; res = 1; } if (HighMapBuffer # 91; shift # 93;! = 0.0 LowMapBuffer # 91; shift # 93; == 0.0) {lasthigh = HighMapBuffer # 91; shift # 93 ;; lasthighpos = shift; Bufor # 91; shift # 93; = lasthigh; whatlookfor = -1; res = 1; } przerwa; case -1:/szukaj trawnika, jeśli (HighMapBuffer # 91; shift # 93;! = 0.0 HighMapBuffer # 91; shift # 93; gt; lasthigh LowMapBuffer # 91; shift # 93; == 0.0){Bufor # 91; lasthighpos # 93; = 0,0; lasthighpos = shift; lasthigh = HighMapBuffer # 91; shift # 93 ;; Bufor # 91; shift # 93; = lasthigh; } if (LowMapBuffer # 91; shift # 93;! = 0.0 HighMapBuffer # 91; shift # 93; == 0.0) {lastlow = LowMapBuffer # 91; shift # 93 ;; lastlowpos = shift; Bufor # 91; przesunięcie # 93; = lastlow; whatlookfor = 1; } przerwa; default: return; }/switch (whatlookfor)}/for (shift = limit; shiftgt; = 0; shift--) total = OrdersTotal (); if (totallt; 1) {_high # 91; i # 93; = ostatnia; _low # 91; i # 93; = lastlow; if (Bid gt; = _high # 91; i # 93;) OrderSend (Symbol (), OP_BUY, Partie, Ask, 3, _low # 91; i # 93;, 0, Long, 1,0, Green); else if (Bid lt; = _low # 91; shift # 93;) OrderSend (Symbol (), OP_SELL, Partie, Licytacja, 3,0,0, Krótki, 1,0, Czerwony); } return (0); }/ ---------------------------------------------- --------------------

  2. #2
    Czy ktoś może mi powiedzieć, jak umieścić zygzak na wskaźnikach w MT 4? doceniam to? dzięki.

Uprawnienia umieszczania postów

  • Nie możesz zakładać nowych tematów
  • Nie możesz pisać wiadomości
  • Nie możesz dodawać załączników
  • Nie możesz edytować swoich postów
  •  
Używamy cookies
Używamy cookies, aby jak najlepiej dostosować witrynę do Twoich potrzeb. Kontynuowanie przeglądania tej strony, oznacza zgodę na używanie plików cookies. Aby uzyskać więcej informacji zapoznaj się z naszą Polityką Prywatności.