Qpile Moving Average

Hallo alle Ich habe versucht, eine EA aus Indikator zu erstellen und ich habe diesen Code in: if (totalUp4) OrderSend (Symbol (), OPBUY, 1, Ask, 3, NULL, NULL, NULL, NULL, 0, CLRNONE) Aber MT gibt mir einen Fehler zurück, der XOROBOT ist ein Indikator und er kann nicht ausgeführt werden. Was Problem Dies ist eine ganze Code: Immobilien indicatorseparatewindow Eigenschaft indicatorbuffers 4 Eigenschaft indicatorcolor1 Darkgoldenrod Eigenschaft indicatorcolor2 dunkelgrün Eigenschaft indicatorcolor3 LimeGreen Eigenschaft indicatorcolor4 Gold-Eigenschaft indicatormaximum 4 Eigenschaft indicatorminimum -4 extern double KirPER7 // 10 extern double slipparage7 // ---- Eingabeparameter / PERIODM1 1 PERIODM5 5 PERIODM15 15 PERIODM30 30 PERIODH1 60 PERIODH4 240 PERIODD1 1440 PERIODW1 10080 PERIODMN1 43200 Sie müssen den numerischen Wert des Zeitraums verwenden, die Sie verwenden möchten, wenn Sie den Zeitrahmen Wert mit den Indikator Eingänge eingestellt. / // ---- Puffert Doppel ExtMapBuffer1 Doppel ExtMapBuffer2 Doppel ExtMapBuffer3 Doppel ExtMapBuffer4 // ---- Indikatoren SetIndexStyle (0, DRAWHISTOGRAM, LEER, 2) SetIndexBuffer (0, ExtMapBuffer1) SetIndexStyle (1, DRAWHISTOGRAM, Leer, 2) SetIndexBuffer (1, ExtMapBuffer2) SetIndexStyle (2, DRAWHISTOGRAM, LEER, 2) SetIndexBuffer (2, ExtMapBuffer3) SetIndexStyle (3, DRAWHISTOGRAM, LEER, 2) SetIndexBuffer (3, ExtMapBuffer4) string Kurzname Kurzname (quot4 TF XO (quotKirPERquot) quot) IndicatorShortName (Kurzname) SetIndexLabel (0, shortname) limitBars-countedbars limitBars-countedbars int lastp150, lastp300, lastp600 für (i0, y0iltlimiti) int p5, p15, p30, p60 p5 i p15 iBarShift (NULL, PERIODM15, timei, false) p30 iBarShift (NULL, PERIODM30, Timei, false) p60 iBarShift (NULL, PERIODH1, Timei, false) / Fügen Sie Ihre Hauptindikatorschleife unten hinzu. Sie können auf ein vorhandenes Kennzeichen mit iName oder iCustom verweisen. Regel 1: Addieren Sie externe Eingaben oben für alle erforderlichen Werte Rule 2: Verwenden Sie TimeFrame für den Indikatorzeitrahmen Regel 3: Verwenden Sie y für Ihre Indikatoren shift value / double totalUp 0.0 double totalDown 0.0 totalUpiCustom (NULL, PERIODM5, quotXOquot, KirPER, 0, i) totalDowniCustom (NULL, PERIODM5, quotXOquot, KirPER, 1, i) totalUp totalUp iCustom (NULL, PERIODM15, quotXOquot, KirPER, 0, p15) totalDown totalDown iCustom (NULL, PERIODM15, quotXOquot, KirPER, 1, p15) totalUp totalUp iCustom (NULL, PERIODM30, quotXOquot, KirPER, 0, p30) totalDown totalDown iCustom (NULL, PERIODM30, quotXOquot, KirPER, 1, p30) totalUp totalUp iCustom (NULL, PERIODH1, quotXOquot, KirPER, 0, p60) totalDown totalDown iCustom ( NULL, PERIODH1, quotXOquot, KirPER, 1, p60) ExtMapBuffer1i 0 ExtMapBuffer2i 0 ExtMapBuffer3i 0 ExtMapBuffer4i 0 if (totalUp 4 totalDown -4) ExtMapBuffer3i totalUp ExtMapBuffer4i totalDown if (totalUp4) OrderSend (Symbol (), OPBUY, 1, fragen, 3, NULL, NULL, NULL, NULL, 0, CLRNONE) sonst noch ExtMapBuffer1i totalUp ExtMapBuffer2i totalDown Bitte helfen Sie mir. Wie kann ich Position schließen, die bereits geöffnet wurde. Ich schrieb dieses: if (totalDown-4 ampamp OrdersTotal () 0) Alert (quotSHORTquot) lastOrderOrderSend (Symbol (), OPSELL, Menge, Bid, 3, NULL, NULL, NULL, 0, 0, CLRNONE) if (totalUp4 ampamp OrdersTotal () 0) Alert (quotLONGquot) lastOrderOrderSend (Symbol (), OPBUY, Menge, fragen, 3, NULL, NULL, NULL, 0, 0, CLRNONE) if (OrdersTotal () 0 ampamp Ordertype () OPBUY ampamp totalDown-4) OrderClose (lastOrder, Menge, Bid, 1, CLRNONE) Alert (quotCLOSE LONG POSITIONquot) if (OrdersTotal () 0 ampamp Ordertype () OPSELL ampamp totalUp4) OrderClose (lastOrder, Menge, fragen, 1, CLRNONE) Alert (quotCLOSE SHORT POSITIONquot) Aber nur Nachricht aufgetreten SCHLIESSEN LANGE POSITION / Wo mein Fehler Bitte helft mir. Wie kann ich Position schließen, die bereits geöffnet wurde. Ich schrieb dieses: if (totalDown-4 ampamp OrdersTotal () 0) Alert (quotSHORTquot) lastOrderOrderSend (Symbol (), OPSELL, Menge, Bid, 3, NULL, NULL, NULL, 0, 0, CLRNONE) if (totalUp4 ampamp OrdersTotal () 0) Alert (quotLONGquot) lastOrderOrderSend (Symbol (), OPBUY, Menge, fragen, 3, NULL, NULL, NULL, 0, 0, CLRNONE) if (OrdersTotal () 0 ampamp Ordertype () OPBUY ampamp totalDown-4) OrderClose (lastOrder, Menge, Bid, 1, CLRNONE) Alert (quotCLOSE LONG POSITIONquot) if (OrdersTotal () 0 ampamp Ordertype () OPSELL ampamp totalUp4) OrderClose (lastOrder, Menge, fragen, 1, CLRNONE) Alert (quotCLOSE SHORT POSITIONquot) Aber nur Nachricht aufgetreten SCHLIEßEN LONG POSITION / Wo ist mein Fehler, den Sie müssen lastorderlong zu verwenden und lastodershort nicht die gleiche nametradecommunity. ru Webseite Informationen in Suchtreffer Schlüsselwörter Ergebnisse 171 050spb 999load Handwerk detaillierte hallo Informationen openssh Picpost Gewinn qpile Zusammenhang shurik Websites smartcom Vorlagen Thema Themen tradecommunity tradecomnn tradecomoil tradecomp tradecompanies tradecompany tradecomplect tradecompleks tradecomplex tradecomplexes tradefinancial tradefrx tradein tradeoil tradephone Tradeportal händler traderu traderussia Gewerke tradingrobot trafron tranceenergy trans trans~~POS=TRUNC transgal aktualisiert willkommen Welt world187 Search Engine Empfohlen KeywordsNBA Geschäftsgerüchte, MLB Geschäftsgerüchte, MLB Handel RU PRS, Gemeinschaft Connect Handel , The Body Shop Gemeinschaft Handel, Los Angeles Trade Community College, Community Trades und Karriere, Gemeinschaftsmarke. Suche, , ..SmartCOM. (Aka Shurik Hallo Welt qpile / QPILE / Hallo Welt qpile 171Hello world187 QPile / QUIK Profit, qpile: tradecommunity. ru/blog Quik / QUIK Profit -, qpile:......... Tradecommunity. ru/blog.. Dark-zone. eu 0-9.ru 194.186.45.230 - SSH-1.99-OpenSSH3.4 050SPB. ru 62.118.252.38 - 053.ru 213.135.102.90 - SSH-1.99-OpenSSH3.1p1 016.ru 217.107.69.67 - e - tradecommunity. ru: e-tradefinancial. ru: e-tradein. ru: e-tradeoil. ru: e-tradeportal. ru: e-trader. ru: e-traders. ru: e-traderu. ru: e-traderussia. ru: e-trades. ru 26 2010 - geschäftsleitung. ru tradefrx. ru tradephone. ru tradingrobot. ru trafron. ru trah-tube. ru tranceenergy. ru trans-live. ru trans-pipe. ru transauto-spb. ru Transgal. ru 999load - Willkommen bei Theme Craft - Themen und Vorlagen. Weitere Informationen hierzu finden Sie hier: http://www. company. ru. Tradecomp. ru. Tradecompanies. ru. Tradecompleks. ru. Tradecomplex. ru. Tradecomplexes. ru Alle Marken sind das Eigentum ihrer jeweiligen Besitzer. Die Fakten, Zahlen, Bewertungen, Aufzeichnungen, Statistiken und andere Daten auf dieser Seite ist nur für Anregungen und Informationen dient nur. HTMLCorner ist nicht verantwortlich für fehlerhafte oder unvollständige Informationen. HTMLCorner übernimmt keine Verantwortung für Nutzerbewertungen von Websites in seiner Ressource und behält sich das Recht vor, diese zu speichern oder zu entfernen. Es wird dringend empfohlen, alle Daten auf Genauigkeit zu überprüfen. Copyright 2009 - 2016 HTMLCorner. Alle Rechte vorbehalten. - Taylor Reihenkoeffizienten lokalen a1, a2, a3, a4, a5 0,31938153, -,356563782, 1,781477937, -1,821255978, 1,330274429 lokale l Math. abs (x) lokale k 1,0 / (1,0 0,2316419 l) lokale w 1,0 - 1,0 / math (K, 3) a4 math. pow (k, 4) a5 math. pow (k, 5)) math. exp (a1 k a2 kk a3 math. pow (k, 3) Wenn x lt 0 dann w 1,0 - w end return w end - Die Black-Scholes-Optionsbewertungsfunktion - iscall: true für call, false für put-s: aktueller Preis - x: Ausübungspreis - t: time - r: Zinssatz - v: Volatilitätsfunktion blackscholes (iscall, s, x, t, r, v) lokal d1 (math. log (s / x) (rvv / 2.0) t) / (v Math. sqrt (T)) lokal d2 d1 - v math. sqrt (t) wenn iscall dann zurückkehren cnd (d1) - x math. exp (-rt) cnd (d2) else return x math. exp (-rt) cnd (- D2) - s cnd (-d1) end end ifndef Pi definieren Pi 3.141592653589793238462643 endif double BlackScholes (char CallPutFlag, doppeltes S, doppeltes X, doppeltes T, doppeltes r, doppeltes v) doppeltes d1, d2 d1 (log (S / X) (Rvv / 2) T) / (vsqrt (T)) d2d1-vsqrt (T) wenn (CallPutFlag c) Rückkehr S CND (d1) - X exp (-rT) CND (d2) sonst wenn (CallPutFlag p) Rückkehr X Exp (-r T) CND (-d2) - S CND (-d1) doppeltes CND (doppeltes X) doppeltes L, K, w doppeltes const a1 0,31938153, a2 1,781477937 Doppelkonstante a4 -1,821255978, a5 1,330274429 L (K & sub3;) a & sub4; pow (K, 4) a & sup5; pow. (& Lambda; & sub1; (K, 5)), wenn (X lt 0) w 1,0 - w Rückkehr w JAVASCRIPT-Funktion BlackScholes (PutCallFlag, S, X, T, r, v) var d1, d2 d1 (Math. log (S / X) (rvv (T), wenn (PutCallFlag c) Rückkehr S CND (d1) - X Math. exp (-r T) CND (d2) Sonst zurückgeben X Math. exp (-r T) CND (-d2) - S CND (-d1) / Die kumulative Normalverteilungsfunktion: / var a1, a2, a3, a4, a5, k a1 0.31938153, a2 -0.356563782, A3 1,781477937, a4 -1,821255978. A5 1.330274429 if (xlt0.0) Rückkehr 1-CND (-x) sonst k 1.0 / (1.0 0.2316419 x) Rückgabe 1.0 - Math. exp (-xx / 2.0) / Math. sqrt (2Math. PI) k (a1 k (& Ndash; 0,2316419 l) p 1 & ndash; 1 / pow (& ndash; 0,3164197 k (1,821255978 k 1,330274429)))) Pi 3,141592653589793238 a1 0,319381530 a2 1,814,117937 a4 1,821255978 a5 (K, 3) a4 pow (k, 4) a5 pow (k, 5)), wenn (2, pi, 0.5) exp (-pow (L, 2) / 2) (Xgt 0) return p else return 1-p-Funktion BlackScholes (callputflag, S, X, T, r, v) d1 (log (S / X) (r pow (v, 2) / 2) (D) - X exp (-r T) CND (d2) sonst Rückkehr X exp (-r T) CND (-d2) - S CND (-d1) BlackScholes Aktienoptionsfunktion Func BlackScholes () Lokales CallPutFlag, S, w, T, r, v, d1 (Log (S / W) (rv 2/2) T) / (V Sqrt (T)), d2 d1 - v Sqrt (T) Wenn CallPutFlag c Dann Lokaler Aufruf (w Exp (-r T) CND (d2)) ElseIf CallPutFlag p Dann Lokales putval (w Exp (-r T) CND (-d2) - S CND (-d1)) EndIf EndFunc gtBlackScholes Die kumulative Normalverteilungsfunktion Func CND (w) Const a1 0,31938153, a2 -0,356563782, a3 1,781477937, a4 1,330274429, Pi (2 Pi) Exp (& ndash; LL / 2) (a 1 K a 2 K 2 a 3 K 3 a 4 K 4 a 5 K 5) Wenn & lgr; W1 lt 0 Dann w 1 - w EndIf Rückkehr w VISUAL BASIC Öffentliche Funktion BlackScholes (CallPutFlag als String, S als Doppelte, X als Doppelte, T als Doppelte, r als Doppelte, v Als Doppelte) Als Doppelte Dim d1 Als Doppelte, d2 As D2 d1 - v Sqr (T) Wenn CallPutFlag c Dann BlackScholes S CND (d1) - X Exp (-r T ) CND (d2) ElseIf CallPutFlag p Dann BlackScholes X Exp (-r T) CND (-d2) - S CND (-d1) End If End Function // Die kumulative Normalverteilungsfunktion Öffentliche Funktion CND (X As Double) As Double Dim L als Doppel, K als doppelte Konstante a1 0.31938153: Const a2 -0.356563782: Const a3 1.781477937: Const a4 -1.821255978: Const a5 1.330274429 L Abs (X) K 1 / (1 0,2316419 L) CND 1 - 1 / Sqr (2 Dann ist CND 1 - CND End If End Function d1 (log (S / X)) (T2) - XTp (-rT) normcdf (d2) sonst Xexp (-rT) normcdf (-d2) - Snormcdf (rv2 / 2) T) / (vsqrt (T)) d2d1-vsqrt (T) (-d1) Endnamespace BlackScholes /// ltsummarygt /// Zusammenfassende Beschreibung für BlackSholes. /// lt / summarygt öffentliche Klasse BlackSholes public BlackSholes () // // TODO: Konstruktorlogik hier hinzufügen // / The Black and Scholes (1973) Aktienoptionsformel C Die Implementierung verwendet das Feld C Math. PI und nicht eine Konstante In der C-Implementierung ist der Wert von Pi 3.14159265358979323846 / public double BlackScholes (string CallPutFlag, double S, double X, double T, double r, double v) double d1 0.0 double d2 0.0 double dBlackScholes 0.0 d1 (Math. Log (S / (T), wenn (CallPutFlag c) dBlackScholes S CND (d & sub1;) - X Math. Exp (& ndash; r T) CND (d2) sonst if (CallPutFlag p) dBlackScholes X Math. Exp (-r T) CND (-d2) - S CND (-d1) Rückgabe dBlackScholes öffentliches Doppel CND (doppeltes X) doppeltes L 0.0 doppeltes K 0.0 doppeltes dCND 0.0 Konst doppelte a1 0.31938153 const doppelte a2 -0.356563782 const doppelte a3 1.781477937 const doppelte a4 -1.821255978 const doppelte a5 1.330274429 L Math. Abs ​​(X) K 1,0 / (1,0 0,2316419 L) dCND 1.0 - 1.0 / Math. Sqrt (2 Convert. ToDouble (Math. PI. ToString ())) Math. Exp (-LL / 2.0) (a1 K a2 KK a3 Math. Pow (K, 3.0) a4 Math. Pow (K, 4.0) a5 Math. Pow (K, 5.0 )) DELPHI / PASCAL-Funktion BlackScholes (CallPutFlag. Zeichenfolge S, X, T, r, v. Double). Double var d1, d2. D2: d1 - v SqRt (T), wenn CallPutFlag c ergibt Ergebnis: 0 d1: (LN (S / X) (r Leistung (v, 2) / 2) T) / (v SqRt (T) S CND (-d2) - S CND (-d1) Endfunktion CND (d1) - X Exp (-r T) CND (d2) sonst wenn CallPutFlag p dann Ergebnis: X Exp (-r T) ). Doppelte Konstante a1 0,31938153 a2 -0,356563782 a3 1,781477937 a4 -1,821255978 a5 1,330274429 beginnen L: Abs (X) K: 1 / (1 0,2316419 L) Ergebnis: 1 - 1 / SqRt (2 Pi) Exp (- (L, 2) / 2) (a1 K a2 Leistung (K, 2) a3 Leistung (K, 3) a4 Leistung (K, 4) a5 Leistung (K, 5) - Ergebnis)


Comments