Einzelnen Beitrag anzeigen
  #19 (permalink)  
Alt 06.03.16
MA-EA MA-EA ist offline
Elite Mitglied
 
Registriert seit: Sep 2015
Beiträge: 565
MA-EA befindet sich auf einem aufstrebenden Ast
Standard

Wer findet die 8 Fehler, der bekommt nen tollen EA.

Code:
//Globale Variablen
int MagicNumber = 541574052;
string Name = "Valerius 3GD Vola-EA";

extern int TimeFrame = 60;
extern string TimeFrames = "Current:0;M1:1; M5:5; M15:15; M30:30; H1:60; H4:240; D1:1440";
extern int CloseGD = 3;
extern int HighGD = 6;
extern int LowGD = 6;
extern int GDType = 0;
extern string GDTypes = "SMA:0; EMA:1; SMMA;2; LWMA:3";
int GDShift = 0;
extern double Lots = 0.01;

extern int Slippage = 300;

extern int Ticket, i;
double PointSet;

//+------------------------------------------------------------------+
//| Expert initialization function                                   |
//+------------------------------------------------------------------+

int OnInit();
{
//---
   
//---
  }
//+------------------------------------------------------------------+
//| Expert deinitialization function                                 |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
  {
//---
   
  }
  
{
int start()

if (Digits <= 3) PointSet = 0.01; else PointSet = 0.0001;
if (Digits <= 1) PointSet = 1;

double LC = iClose(Symbol(), TimeFrame, 1);
double CloseGD = iMA(Symbol(), TimeFrame, CloseGD, GDShift, GDType, PRICE_CLOSE, 1);
double HighGD = iMA(Symbol(), TimeFrame, HighGD, GDShift, GDType, PRICE_HIGH, 1);
double LowGD = iMA(Symbol(), TimeFrame, LowGD, GDShift, GDType, PRICE_LOW, 1);


//Open Orders
{
if (LC>CloseGD && CloseGD>HighGD) OrderSend(Symbol(), OP_BUY, (Lots, Ask, Slippage, Name + " Buy(#" + MagicNumber + ")", MagicNumber, 1,  Blue));
if (LC<CloseGD && CloseGD<LowGD) OrderSend(Symbol(), OP_SELL, (Lots, Bid, Slippage, Name + " Sell(#" + MagicNumber + ")", MagicNumber, 1,  Red));
}

{
int OrderSelect(SELECT_BY_TICKET);
}
//Close Orders
{
if (LC<CloseGD && CloseGD<HighGD) OrderClose(Symbol(), OP_BUY, (Lots, Bid, Slippage, ), Blue,)) ;
if (LC>CloseGD && CloseGD>LowGD) OrderClose(Symbol(), OP_SELL, (Lots, Ask, Slippage, ), Red,)) ;
}

int return();
}

Geändert von MA-EA (06.03.16 um 16:47 Uhr)