Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools

Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools (http://www.expert-advisor.com/forum/index.php)
-   Programmierung MQL4 (http://www.expert-advisor.com/forum/forumdisplay.php?f=220)
-   -   EA Durchschnitte... MA (http://www.expert-advisor.com/forum/showthread.php?t=4938)

forexman 15.05.16 18:01

EA Durchschnitte... MA
 
Hallo, ich recht neu im EA erstellen. Kann mir emand die Formel sagen wenn ich einen MA anlege und ich möchte eine Auswahl treffen bei MA Methode....beispiel Simple und bei Anwenden auf Close usw...... Meom grund gerücst steht aber wie spreche ich diese parameter an.

Danke

Gruß
Kathrin

MA-EA 15.05.16 19:31

Globale Variablen:
Code:

extern int GD_Type = 0;
extern string GD_Types = "SMA:0; EMA:1; SMMA;2; LWMA:3";

Irgendwann nach der Start-Function:
Code:

double F_MA = iMA(Symbol(), TimeFrame, Fast_MA, GD_Shift, GD_Type, PRICE_CLOSE, 1);
Die 1 ganz hinten steht für die (vorletzte) Kerze 1.

Statt PRICE_CLOSE kann man auch

PRICE_HIGH
PRICE_OPEN
PRICE_LOW

und ich glaube auch
PRICE_HIGHEST
PRICE_LOWEST

eingeben. Weiß ich aber nicht genau.


Alle Zeitangaben in WEZ +2. Es ist jetzt 20:34 Uhr.

Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.1
Powered by vBCMS® 2.7.0 ©2002 - 2024 vbdesigns.de
Copyright ©2009 - 2023 by Expert-Advisor.com - Das Metatrader Forum