MQ4 CODIGOS EA, QUE TIENEN MUY BUENA PINTA PERO NO CONSIGO..

Foro dedicado a todo lo relacionado con la versión 4 de la plataforma de Metaquotes.
Responder
desnut
Mensajes: 6
Registrado: 10 Jul 2008 11:24
Ubicación: españa

MQ4 CODIGOS EA, QUE TIENEN MUY BUENA PINTA PERO NO CONSIGO..

Mensaje por desnut »

Buenas a todos y a todas ;).
me llamo jordi y desde hace un mes aproximadamente que estoy investigando el tema de los Expert Advisor y los Indicadores.

Hasta el momento he estado probando EA, y bueno he encontrado unos codigos de EA, que parecen tener muy buena pinta pero que al compilar me petan. No tengo ni idea de Mq4 aunque intento aprender buscando informacion aqui alla.. el tito google... etc (ya que lo mio es encontrar) pero beno al grano.
Aqui dejo el primer codigo que me peta con 5 errores.
En el primer error me dice algo de double quote nedded en un apartado en el que parece faltar algo entre parentesis antes de un ;
los siguientes errores se refieren todos a los datos GMT+2?);

Ire posteando haber si alguien le encuentra solucion al tema y empiezan ya las pruevas XD. un saludo




/*[[
Name := FAB4X 3*7*21 System
Author := Fabio Lio Copyright © DEC 2004
Link := RUN ONLY ON A 15MIN CHART.GBP/USD BEST
Lots := 1.00
Stop Loss := 0
Take Profit := 50
Trailing Stop := 15
]]*/
Input : FastPeriod(7), SlowPeriod(21);
Input : FastPeriodX(3), SlowPeriodX(21);
Input : FastPeriodE(3), SlowPeriodE(7);
Defines : risk(10),mm(1),settime(15),endtime(23);
Variable : shift(0);
Variable : iMASlowPrevious(0), iMaSlowCurrent(0), iMaFastPrevious(0), iMaFastCurrent(0);
Variable : iMASlowPreviousE(0), iMaSlowCurrentE(0), iMaFastPreviousE(0), iMaFastCurrentE(0);
Variable : iMASlowPreviousX(0), iMaSlowCurrentX(0), iMaFastPreviousX(0), iMaFastCurrentX(0);
Variable : val1(0), val2(0);
Variables : EACross1(0),EACross2(0),Current(0),cnt(0);
Var : TR(0),TR1(0),TR2(0),TRPREV(0);
var: myFileName(” “),myFile(0);
var: alertTime(”"),;
var: OrderText(”"),AlertText(”");
var: lotsi(0);
var: vMode11(0);
var: vMode12(0);

myFileName=Symbol + Period + ” FAB4X3721?;

//MONEY MANAGEMENT

if mm<>0 then
lotsi=Ceil(Equity*risk/10000)/10
else
lotsi=lots;

vMode11 = iCustom(”iTrend”,0,0,0,20,2,5,MODE_FIRST,0);
vMode12 = iCustom(”iTrend”,0,0,0,20,2,5,MODE_SECOND,0);

//IF bars<250 then exit;

If (DayOfWeek <2 or DayOfWeek >6 or hour < 15 or hour >22) then exit;

if TotalTrades < 1 then
{
iMaSlowPrevious = iMAEx(SlowPeriod, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaSlowCurrent = iMAEx(SlowPeriod, MODE_EMA, 0, PRICE_CLOSE, 0);
iMaFastPrevious = iMAEx(FastPeriod, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaFastCurrent = iMAEx(FastPeriod, MODE_EMA, 0, PRICE_CLOSE, 0);

iMaSlowPreviousE = iMAEx(SlowPeriodE, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaSlowCurrentE = iMAEx(SlowPeriodE, MODE_EMA, 0, PRICE_CLOSE, 0);
iMaFastPreviousE = iMAEx(FastPeriodE, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaFastCurrentE = iMAEx(FastPeriodE, MODE_EMA, 0, PRICE_CLOSE, 0);

iMaSlowPreviousX = iMAEx(SlowPeriodX, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaSlowCurrentX = iMAEx(SlowPeriodX, MODE_EMA, 0, PRICE_CLOSE, 0);
iMaFastPreviousX = iMAEx(FastPeriodX, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaFastCurrentX = iMAEx(FastPeriodX, MODE_EMA, 0, PRICE_CLOSE, 0);

If iMaFastPrevious<iMaSlowPrevious and iMaFastCurrent>iMASlowCurrent and vMode11= 1 and vMode12= 0 then
{
myFile = FileOpen(myFileName,”,”);
FileWrite(myFile, “It is a good time to buy “,symbol,”@”,OPEN + hour +”:”+ Minute + “:” + Seconds +” GMT+2?);
FileClose(myFile);

Alert(Month,”/”,Day,” “,alertTime,” Buy “,Symbol,” @”,OPEN, ” “, AlertText);
SetOrder(OP_BUY,lotsi,OPEN,3,0,OPEN+TakeProfit*Point,Green);

};

If iMaFastPreviousX>iMaSlowPreviousX and iMaFastCurrentX<iMASlowCurrentX Then
{
Alert(Month,”/”,Day,” “,alertTime,” EXIT NOW “,Symbol,” @”,pricebid, ” “, AlertText);
};

If iMaFastPreviousE>iMaSlowPreviousE and iMaFastCurrentE<iMASlowCurrentE Then
{
Alert(Month,”/”,Day,” “,alertTime,” TRADE NOW GOING SHORT “,Symbol,” @”,pricebid, ” “, AlertText);
};

If iMaFastPrevious>iMaSlowPrevious and iMaFastCurrent<iMASlowCurrent and vMode11= 0 and vMode12= -1 Then
{
myFile = FileOpen(myFileName,”,”);
FileWrite(myFile, “It is a good time to sell”,symbol,”@”,OPEN + hour +”:”+ Minute + “:” + Seconds +” GMT+2?);
FileClose(myFile);
Alert(Month,”/”,Day,” “,alertTime,” Sell “,Symbol,” @”,OPEN,AlertText);
SetOrder(OP_SELL,lotsi,OPEN,3,0,OPEN-TakeProfit*Point,RED);

};

If iMaFastPreviousX<iMaSlowPreviousX and iMaFastCurrentX>iMASlowCurrentX Then
{
Alert(Month,”/”,Day,” “,alertTime,” EXIT NOW “,Symbol,” @”,priceask, ” “, AlertText);
};

If iMaFastPreviousE<iMaSlowPreviousE and iMaFastCurrentE>iMASlowCurrentE Then
{
Alert(Month,”/”,Day,” “,alertTime,” TRADE NOW GOING LONG “,Symbol,” @”,priceask, ” “, AlertText);
};

};

///////////////Allow For Attachment to more than one Chart

If TotalTrades > 0 then
{

Current = 0;

for cnt = 1 to TotalTrades

Begin
If Not Ord(cnt,VAL_SYMBOL) = Symbol then
{
Current = Current+1; // if this trade is NOT in the currency pair that the advisor is attached to than add 1 to Current
}
else
{
if Ord(cnt,VAL_SYMBOL) = Symbol then
{
iMaSlowPreviousE = iMAEx(SlowPeriodE, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaSlowCurrentE = iMAEx(SlowPeriodE, MODE_EMA, 0, PRICE_CLOSE, 0);
iMaFastPreviousE = iMAEx(FastPeriodE, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaFastCurrentE = iMAEx(FastPeriodE, MODE_EMA, 0, PRICE_CLOSE, 0);

If iMaFastPreviousX>iMaSlowPreviousX and iMaFastCurrentX<iMASlowCurrentX Then
{
if Ord(cnt,VAL_TYPE) = OP_BUY then
{
CloseOrder(OrderValue(cnt,VAL_TICKET),OrderValue(cnt,VAL_LOTS),pricebid,3,Red);
exit;
};

};

If iMaFastPreviousX<iMaSlowPreviousX and iMaFastCurrentX>iMASlowCurrentX Then
{
if Ord(cnt,VAL_TYPE) = OP_SELL then
{
CloseOrder(OrderValue(cnt,VAL_TICKET),OrderValue(cnt,VAL_LOTS),priceask,3,Red);
exit;
}; };

};

};

End;

If Current = TotalTrades then // There are NO open positions in the currency pair that the advisor is attached to
{

iMaSlowPrevious = iMAEx(SlowPeriod, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaSlowCurrent = iMAEx(SlowPeriod, MODE_EMA, 0, PRICE_CLOSE, 0);
iMaFastPrevious = iMAEx(FastPeriod, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaFastCurrent = iMAEx(FastPeriod, MODE_EMA, 0, PRICE_CLOSE, 0);

iMaSlowPreviousE = iMAEx(SlowPeriodE, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaSlowCurrentE = iMAEx(SlowPeriodE, MODE_EMA, 0, PRICE_CLOSE, 0);
iMaFastPreviousE = iMAEx(FastPeriodE, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaFastCurrentE = iMAEx(FastPeriodE, MODE_EMA, 0, PRICE_CLOSE, 0);

iMaSlowPreviousX = iMAEx(SlowPeriodX, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaSlowCurrentX = iMAEx(SlowPeriodX, MODE_EMA, 0, PRICE_CLOSE, 0);
iMaFastPreviousX = iMAEx(FastPeriodX, MODE_EMA, 0, PRICE_CLOSE, 1);
iMaFastCurrentX = iMAEx(FastPeriodX, MODE_EMA, 0, PRICE_CLOSE, 0);

If iMaFastPrevious<iMaSlowPrevious and iMaFastCurrent>iMASlowCurrent and vMode11= 1 and vMode12= 0 Then
{
myFile = FileOpen(myFileName,”,”);
FileWrite(myFile, “It is a good time to buy “,symbol,”@”,OPEN + hour +”:”+ Minute + “:” + Seconds +” GMT+2?);
FileClose(myFile);

Alert(Month,”/”,Day,” “,alertTime,” Buy “,Symbol,” @”,OPEN, ” “, AlertText);
SetOrder(OP_BUY,lotsi,OPEN,3,0,OPEN+TakeProfit*Point,GREEN);

If iMaFastPreviousX<iMaSlowPreviousX and iMaFastCurrentX>iMASlowCurrentX Then
{
Alert(Month,”/”,Day,” “,alertTime,” EXIT NOW “,Symbol,” @”,priceask, ” “, AlertText);
};

If iMaFastPreviousE<iMaSlowPreviousE and iMaFastCurrentE>iMASlowCurrentE Then
{
Alert(Month,”/”,Day,” “,alertTime,” TRADE NOW GOING SHORT “,Symbol,” @”,priceask, ” “, AlertText);
};

If iMaFastPrevious>iMaSlowPrevious and iMaFastCurrent<iMASlowCurrent and vMode11= 0 and vMode12= -1 Then
{
myFile = FileOpen(myFileName,”,”);
FileWrite(myFile, “It is a good time to sell “,symbol,”@”,OPEN + hour +”:”+ Minute + “:” + Seconds +” GMT+2?);
FileClose(myFile);

Alert(Month,”/”,Day,” “,alertTime,” Sell “,Symbol,” @”,OPEN,AlertText);
SetOrder(OP_SELL,lotsi,OPEN,3,0,OPEN-TakeProfit*Point,RED);
};

If iMaFastPreviousX<iMaSlowPreviousX and iMaFastCurrentX>iMASlowCurrentX Then
{
Alert(Month,”/”,Day,” “,alertTime,” EXIT NOW “,Symbol,” @”,priceask, ” “, AlertText);
};

If iMaFastPreviousE<iMaSlowPreviousE and iMaFastCurrentE>iMASlowCurrentE Then
{
Alert(Month,”/”,Day,” “,alertTime,” TRADE NOW GOING LONG “,Symbol,” @”,priceask, ” “, AlertText);
};

};

};

///////////////End Allow For Attachment to more than one Chart

//////////////////////////////////////////////////////////
/////////////////////////Trailing Stop Code /////////////////////
//////////////////////////////////////////////////////////

If TotalTrades > 0 then
{
for cnt = 1 to TotalTrades

Begin

If Ord(cnt,VAL_TYPE)=OP_BUY then
{
///////////////////
If Ord(cnt,VAL_SYMBOL)= Symbol then
{
If Ord(cnt,VAL_OPENPRICE) + TrailingStop*Point < Bid Then
{

If Ord(cnt,VAL_STOPLOSS)<(Bid-TrailingStop*Point) then
{
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),
Bid-TrailingStop*Point,Ord(cnt,VAL_TAKEPROFIT),Red);
Exit;
};
};
If Ord(cnt,VAL_TAKEPROFIT) = 0 Then
{
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),
Ord(cnt,VAL_OPENPRICE)-StopLoss*Point,Ord(cnt,VAL_OPENPRICE)+TakeProfit*Point,Red);
Exit;
};
};

};// End of BUY

If Ord(cnt,VAL_TYPE)=OP_SELL then
{

///////////////////
If Ord(cnt,VAL_SYMBOL)= Symbol then
{

If Ord(cnt,VAL_OPENPRICE) - TrailingStop*Point > Ask Then
{

If Ord(cnt,VAL_STOPLOSS)>(Ask+TrailingStop*Point) then
{
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),Ask+TrailingStop*Point,
Ord(cnt,VAL_TAKEPROFIT),White);
Exit;
};
};

If Ord(cnt,VAL_TAKEPROFIT) = 0 Then
{
ModifyOrder(Ord(cnt,VAL_TICKET),Ord(cnt,VAL_OPENPRICE),
Ord(cnt,VAL_OPENPRICE)+StopLoss*Point,Ord(cnt,VAL_OPENPRICE)-TakeProfit*Point,Red);
Exit;
};

};

};//End of Sell

End;
};
};
Avatar de Usuario
ledzep
Mensajes: 410
Registrado: 25 Sep 2006 03:19
Ubicación: Colombia

Mensaje por ledzep »

De donde sacaste ese código tan extraño? no tiene 5 sino 5.000 errores

por darte un ejemplo:

If Ord(cnt,VAL_TAKEPROFIT) = 0 Then

esto ni siquiera es C, es basic.

s2.
desnut
Mensajes: 6
Registrado: 10 Jul 2008 11:24
Ubicación: españa

otro codigo

Mensaje por desnut »

Hola de nuevo ;).
Pues no se exactamente de donde lo saque, era una web asi medio en ruso meido en english y habian bastantes codigos los cuales todos me petan, lo que me ha dado a deducir que no son para el metatrader, pero entonces para que plataforma seran¿?¿??¿? parecen bastante completos.
Bueno aqui pego otro haber si alguien resuelve el misterio.





//+——————————————————————+
//| NarrowBreakout_GBPM30 |
//| Copyright © 2006, Lingyu Jiang |
//+——————————————————————+
extern string Broker=”Alpari”; // you can also set “FXDD”, “IBFX” here

//—- common parameters
extern bool UseMM=true;
extern double LotsIfNoMM=1.0;
extern double MMRiskFactor=0.2;
extern int Spread=4;
extern int Start=9;
extern int EOD=17;

//—- input parameters for narrow range breakout
extern int NLookbackBars=4;
extern int NPips=10;
extern int NStopLoss=45;
extern int NBreakEven=15;
extern int NTakeProfit=0;
extern int NRangeMax=43;

//—- global variables
double Lots=1.0;
int MagicNumber2=2;
double EntryLong2=0,EntryShort2=0;

int init()
{
if (Broker == “FXDD”) {
Spread=3;
Start=10;
EOD=18;
NLookbackBars=4;
NPips=10;
NStopLoss=45;
NBreakEven=16;
NTakeProfit=0;
NRangeMax=42;
}
else if (Broker == “IBFX”) {
Spread=4;
Start=8;
EOD=16;
NLookbackBars=4;
NPips=10;
NStopLoss=45;
NBreakEven=15;
NTakeProfit=0;
NRangeMax=43;
}
return (0);
}

//— MM calculation
double CalculateMMLot()
{
double lot_min =MarketInfo(Symbol(),MODE_MINLOT);
double lot_max =MarketInfo(Symbol(),MODE_MAXLOT);
double lot_step=MarketInfo(Symbol(),MODE_LOTSTEP);
double lot;
//— check data
if(lot_min<0 || lot_max<=0.0 || lot_step<=0.0) {
Print(”CalculateMMLot: invalid MarketInfo() results [",lot_min,",",lot_max,",",lot_step,"]“);
return(0);
}
if(AccountLeverage()<=0) {
Print(”CalculateMMLot: invalid AccountLeverage() [",AccountLeverage(),"]“);
return(0);
}
//— basic formula
lot=NormalizeDouble((AccountBalance())*MMRiskFactor/AccountLeverage()/10.0,2);
lot=NormalizeDouble(lot/lot_step,0)*lot_step;
if(lot<lot_min) lot=lot_min;
if(lot>lot_max) lot=lot_max;
//—
return(lot);
}

//+——————————————————————+
//| expert start function |
//+——————————————————————+
int start()
{
//—-
int i,Ticket,LastOrderTime,StartTime,StartTime1,StartTime2,EODTime;

if (UseMM) Lots=CalculateMMLot(); else Lots=LotsIfNoMM;

//Count time
if(CurTime()>=StrToTime(Start+”:00?)-60){
StartTime1=StrToTime(Start+”:00?);
if(DayOfWeek()==5) EODTime=MathMin(StrToTime(”22:55?),StrToTime(EOD+”:00?)-60);
else if (EOD==24) EODTime=StrToTime(”23:59?);
else EODTime=StrToTime(EOD+”:00?)-60;
}

// Set narrow range breakout orders
if(TimeHour(CurTime()) >= Start && TimeHour(CurTime())<EOD) {
SetNarrowRangeBreakoutOrders(MagicNumber2);
}

//Manage of open orders
for (i=0;i<OrdersTotal();i++){
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if (OrderMagicNumber()!=MagicNumber2) continue;
if(CurTime()<=GlobalVariableGet(”LastOrderTime”)+10) Sleep(10000);
if(CurTime()>=EODTime){ //close open positions at EOD
if(OrderSymbol()==Symbol() && OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,3,Red);
if(OrderSymbol()==Symbol() && OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
if(OrderSymbol()==Symbol() && OrderType()==OP_BUYSTOP) OrderDelete(OrderTicket());
if(OrderSymbol()==Symbol() && OrderType()==OP_SELLSTOP) OrderDelete(OrderTicket());
GlobalVariableSet(”LastOrderTime”,CurTime());
}
else {
double OpenPrice = 0;
// manage narrow range breakout orders
if (OrderMagicNumber() == MagicNumber2) {
OpenPrice = 0;
//move at BE if profit>BE
if(OrderSymbol()==Symbol() && OrderType()==OP_BUY){
if (EntryLong2 != 0) {
OpenPrice = EntryLong2;
} else {
OpenPrice = OrderOpenPrice();
}
if(High[1]-OpenPrice>=NBreakEven*Point && High[0]-OpenPrice>=NBreakEven*Point && OrderStopLoss()<OpenPrice+5*Point){
OrderModify(OrderTicket(),OrderOpenPrice(),OpenPrice+5*Point,OrderTakeProfit(),0,Green);
GlobalVariableSet(”LastOrderTime”,CurTime());
}
}
if(OrderSymbol()==Symbol() && OrderType()==OP_SELL){
if (EntryShort2 != 0) {
OpenPrice = EntryShort2;
} else {
OpenPrice = OrderOpenPrice();
}
if(OpenPrice-Low[1]-Spread*Point>=NBreakEven*Point && OpenPrice-Low[0]-Spread*Point>=NBreakEven*Point && OrderStopLoss()>OpenPrice-5*Point){
OrderModify(OrderTicket(),OrderOpenPrice(),OpenPrice-5*Point,OrderTakeProfit(),0,Green);
GlobalVariableSet(”LastOrderTime”,CurTime());
}
}
}
}
}

//Reset global variables at EOD
if(CurTime()>=EODTime) GlobalVariablesDeleteAll();

return(0);
}

//+——————————————————————+
int SetNarrowRangeBreakoutOrders(int MN) {
int i,Ticket,LastOrderTime,Bought=0,Sold=0,ShiftToStart,ShiftToBeginOfRange;
double SLLong,SLShort,TPLong,TPShort;

//Check Orders
for (i=0;i<OrdersTotal();i++){
OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
if(OrderSymbol()==Symbol() && (OrderType()==OP_BUYSTOP || OrderType()==OP_BUY) && OrderMagicNumber()==MN) Bought++;
if(Bought>1){ //more than 1 buy order
if(CurTime()<=GlobalVariableGet(”LastOrderTime”)+10) Sleep(10000);
if(OrderSymbol()==Symbol() && OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,3,Red);
if(OrderSymbol()==Symbol() && OrderType()==OP_BUYSTOP) OrderDelete(OrderTicket());
}
if(OrderSymbol()==Symbol() && (OrderType()==OP_SELLSTOP || OrderType()==OP_SELL) && OrderMagicNumber()==MN) Sold++;
if(Sold>1){ //more than 1 sell order
if(CurTime()<=GlobalVariableGet(”LastOrderTime”)+10) Sleep(10000);
if(OrderSymbol()==Symbol() && OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,3,Red);
if(OrderSymbol()==Symbol() && OrderType()==OP_SELLSTOP) OrderDelete(OrderTicket());
}
}

if(Bought==0 && Sold==0){ //no buy order
// determine range
EntryLong2 =High[Highest(NULL,PERIOD_M30,MODE_HIGH,NLookbackBars,1)]+(NPips+Spread)*Point;
EntryShort2 =Low[Lowest (NULL,PERIOD_M30,MODE_LOW, NLookbackBars,1)]-NPips*Point;
SLLong =MathMax(EntryLong2-NStopLoss*Point,EntryShort2);
SLShort =MathMin(EntryShort2+NStopLoss*Point,EntryLong2);
if (NTakeProfit!=0) {
TPLong =EntryLong2+NTakeProfit*Point;
TPShort =EntryShort2-NTakeProfit*Point;
} else {
TPLong =0;
TPShort =0;
}

if (EntryLong2-EntryShort2>=NRangeMax*Point) { //So we can filter out large ranges
// Ensures that no trades will be opened
Bought=1;
Sold=1;
return (0);
}

if(CurTime()<=GlobalVariableGet(”LastOrderTime”)+10) Sleep(10000);
Ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,EntryLong2,3,SLLong,TPLong,NULL,MN,0,Green);
if(Ticket<0 && GetLastError()==130 && High[0]+Spread*Point>=EntryLong2 && Ask <= EntryLong2+3*Point && Ask>=EntryLong2-3*Point)
Ticket=OrderSend(Symbol(),OP_BUY,Lots,EntryLong2,3,SLLong,TPLong,NULL,MN,0,Green);
GlobalVariableSet(”LastOrderTime”,OrderOpenTime());

if(CurTime()<=GlobalVariableGet(”LastOrderTime”)+10) Sleep(10000);
Ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,EntryShort2,3,SLShort,TPShort,NULL,MN,0,Green);
if(Ticket<0 && GetLastError()==130 && Low[0]<=EntryShort2 && Bid>=EntryShort2-3*Point && Bid<=EntryShort2+3*Point)
Ticket=OrderSend(Symbol(),OP_SELL,Lots,EntryShort2,3,SLShort,TPShort,NULL,MN,0,Green);
GlobalVariableSet(”LastOrderTime”,OrderOpenTime());
}
}
Avatar de Usuario
ledzep
Mensajes: 410
Registrado: 25 Sep 2006 03:19
Ubicación: Colombia

Mensaje por ledzep »

Pues esto ya es otra cosa, compila perfecto solo falta arreglar algunas lineas donde aparece la hora por el valor correcto sin los interrogantes:

if(CurTime()>=StrToTime(Start+”:00?)


No te entusiasmes mucho con estos EAs, hay por toneladas y el 99.99% no sirven o es tan complicado entenderlos y optimizarlos que es mas rápido escribir uno propio.

s2.
Si te ha gustado este hilo del Foro, ¡compártelo en redes!


Responder

Volver a “Metatrader 4”