¿Cómo codificar? - página 154

 

Kikousi,

Puede que quieras probar por ti mismo las mejores coordenadas. FerruFX y CJA han utilizado las mejores soluciones de tener las posiciones de las esquinas por defecto con las entradas del usuario para la colocación de objetos. También es posible que desee buscar en OBJPROP_CORNER

También, por favor, trate de no publicar la misma solicitud que usted ha hecho. Los usuarios ven tu post, y si alguien puede ayudarte lo hará.

Gracias

Edit: Usando la propiedad de la esquina 0 es superior izquierda, 1 es superior derecha, 2 inferior izquierda, 3 inferior derecha. Es 0 cuenta.

 

Ayuda con la depuración de mi EA

Hola. Lo siento si este es el foro equivocado para publicar y por favor arreglar si es.

He programado mi propio EA y tengo algunos problemas con el llenado de órdenes y las órdenes de stop loss. ¿Podría alguien ayudar? Puedo compartir el EA.

Gracias

 

codobro,

Muchas gracias por su amable respuesta.

A partir de ahora no volveré a publicar la misma pregunta.

Agradezco tu sugerencia.

A este respecto, entiendo que la posición superior izquierda es (0,0) , entonces ¿Cuál es la indicación de la inferior derecha en ese momento?

Por ejemplo, ¿puedo utilizar (250,350) para la indicación de la parte inferior derecha cuando la posición superior izquierda es (0,0)?

Les agradezco de antemano su amable comprensión de lo anterior.

 

El gráfico del indicador no muestra todos los datos

Hola

Soy bastante bueno en la programación C, pero empezando con MQL4.

Acabo de hacer mi primer indicador y muestra una matriz en parte en la ventana separada.

Por parte me refiero a que si se desplaza a la izquierda, a continuación, para algunos períodos de tiempo no se muestra nada, y si se desplaza más a la izquierda, a continuación, los datos i muestra para algunos períodos y así sucesivamente.

Si se desplaza a la derecha, entonces los mismos períodos de tiempo no se muestran.

Por lo demás, no veo ningún patrón.

Además, si me desplazo de 1 minuto, donde sí veo algunos datos, a digamos 5 minutos, entonces no se muestra nada en absoluto.

¿Por qué no se muestran todos los datos? ¿Qué puedo haber pasado por alto?

 

Buen EA - NECESITA AYUDA

Hai,

¿Hay alguien en este gran foro, podría modificar este EA sin ninguna pérdida de la parada.

Gracias

//---- parámetros de entrada ---------------------------------------------+

extern int INCREMENTO=35;

extern double LOTS=0.1;

extern int NIVELES=3;

extern double MAX_LOTS=99;

extern int MAGIC=1803;

extern bool CONTINUE=true;

extern bool MONEY_MANAGEMENT=false;

extern int RISK_RATIO=2;

//+------------------------------------------------------------------+

bool UseProfitTarget=false;

bool UsePartialProfitTarget=false;

int Incremento_de_objetivo = 50;

int Primer_objetivo=20;

bool UseEntryTime=false;

int EntryTime=0;

//+------------------------------------------------------------------+

bool Enter=true;

int siguienteTP;

int init()

{

//+------------------------------------------------------------------+

nextTP = Primer_Objetivo;

//+------------------------------------------------------------------+

return(0);

}

//+------------------------------------------------------------------+

//| función de desinicialización experta ||.

//+------------------------------------------------------------------+

int deinit()

{

return(0);

}

//+------------------------------------------------------------------+

//| función de inicio experta ||

//+------------------------------------------------------------------+

int inicio()

{

int ticket, cpt, profit, total=0, BuyGoalProfit, SellGoalProfit, PipsLot;

double ProfitTarget=INCREMENT*2, BuyGoal=0, SellGoal=0, spread=(Ask-Bid)/Point, InitialPrice=0;

//----

if(INCREMENTO<MarketInfo(Símbolo(),MODO_STOPLEVEL)+spread) INCREMENTO=1+MarketInfo(Símbolo(),MODO_STOPLEVEL)+spread;

if(MONEY_MANAGEMENT) LOTS=NormalizeDouble(AccountBalance()*AccountLeverage()/1000000*RISK_RATIO,0)*MarketInfo(Symbol(),MODE_MINLOT);

if(LOTS<MarketInfo(Symbol(),MODE_MINLOT))

{

Comment("No hay suficiente margen libre para empezar");

return(0);

}

for(cpt=1;cpt<LEVELS;cpt++) PipsLot+=cpt*INCREMENTO;

for(cpt=0;cpt<OrdersTotal();cpt++)

{

OrderSelect(cpt,SELECT_BY_POS,MODE_TRADES);

if(OrderMagicNumber()==MAGIC && OrderSymbol()==Symbol())

{

total++;

if(!InitialPrice) InitialPrice=StrToDouble(OrderComment());

if(UsePartialProfitTarget && UseProfitTarget && OrderType()<2)

{

double val=getPipValue(OrderOpenPrice(),OrderType());

takeProfit(val,OrderTicket());

}

}

}

if(total<1 && Enter && (!UseEntryTime || (UseEntryTime && Hour()==EntryTime))

{

if(AccountFreeMargin()<(100*LOTS))

{

Print("No hay suficiente margen libre para empezar");

return(0);

}

// - Abrir cheque - Iniciar ciclo

PrecioInicial=Precio;

SellGoal=PrecioInicial-(NIVELES+1)*INCREMENTO*Punto;

BuyGoal=PrecioInicial+(NIVELES+1)*INCREMENTO*Punto;

for(cpt=1;cpt<=NIVELES;cpt++)

{

OrderSend(Symbol(),OP_BUYSTOP,LOTS,InitialPrice+cpt*INCREMENT*Point,2,SellGoal,BuyGoal,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS)),MAGIC,0);

OrderSend(Symbol(),OP_SELLSTOP,LOTS,InitialPrice-cpt*INCREMENT*Point,2,BuyGoal+spread*Point,SellGoal+spread*Point,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS),MAGIC,0);

}

} // la configuración inicial está hecha - todos los canales están configurados

else // Tenemos órdenes abiertas

{

BuyGoal=PrecioInicial+INCREMENTO*(NIVELES+1)*Punto;

SellGoal=PrecioInicial-INCREMENTO*(NIVELES+1)*Punto;

total=Historia de pedidosTotal();

for(cpt=0;cpt<total;cpt++)

{

OrderSelect(cpt,SELECT_BY_POS,MODE_HISTORY);

if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC && StrToDouble(OrderComment())==PrecioInicial){EndSession();return(0);}

}

if(UseProfitTarget && CheckProfits(LOTS,OP_SELL,true,InitialPrice)>ProfitTarget) {EndSession();return(0);}

BuyGoalProfit=CheckProfits(LOTS,OP_BUY,false,InitialPrice);

SellGoalProfit=CheckProfits(LOTS,OP_SELL,false,InitialPrice);

if(BuyGoalProfit<ProfitTarget)

// - Lotes Incrimentados Comprar

{

for(cpt=LEVELS;cpt>=1 && BuyGoalProfit<ProfitTarget;cpt--)

{

if(Ask<=(InitialPrice+(cpt*INCREMENT-MarketInfo(Symbol(),MODE_STOPLEVEL))*Point)

{

ticket=OrderSend(Symbol(),OP_BUYSTOP,cpt*LOTS,InitialPrice+cpt*INCREMENT*Point,2,SellGoal,BuyGoal,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS)),MAGIC,0);

}

if(ticket>0) BuyGoalProfit+=LOTS*(BuyGoal-InitialPrice-cpt*INCREMENT*Point)/Point;

}

}

if(SellGoalProfit<ProfitTarget)

// - Incrementa los lotes de venta

{

for(cpt=LEVELS;cpt>=1 && SellGoalProfit<ProfitTarget;cpt--)

{

if(Oferta>=(PrecioInicial-(cpt*INCREMENTO-MarketInfo(Símbolo(),MODO_STOPLEVEL))*Punto))

{

ticket=OrderSend(Symbol(),OP_SELLSTOP,cpt*LOTS,InitialPrice-cpt*INCREMENT*Point,2,BuyGoal+spread*Point,SellGoal+spread*Point,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS)),MAGIC,0);

}

if(ticket>0) SellGoalProfit+=LOTS*(InitialPrice-cpt*INCREMENT*Point-SellGoal-spread*Point)/Point;

}

}

}

//+------------------------------------------------------------------+

Comentario("mGRID EXPERT ADVISOR ver 2.0\n",

"FX Acc Server:",AccountServer(),"\n",

"Fecha: ",Mes(),"-",Día(),"-",Año()," Hora del servidor: ",Hora(),":",Minuto(),":",Segundos(),"\n",

"Tamaño mínimo del lote: ",MarketInfo(Symbol(),MODE_MINLOT),"\n",

"Saldo de la cuenta: $",AccountBalance(),"\n",

"Símbolo: ", Symbol(),"\n",

"Precio: ",NormalizeDouble(Bid,4),"\n",

"Pip Spread: ",MarketInfo("EURUSD",MODE_SPREAD),"\n",

"Incremento=" + INCREMENTO,"\n",

"Lotes: ",LOTS,"\n",

"Niveles: " + NIVELES,"\n");

return(0);

}

//+------------------------------------------------------------------+

int CheckProfits(double LOTS, int Goal, bool Current, double InitialPrice)

{

int beneficio=0, cpt;

if(Current)//devuelve el beneficio actual

{

for(cpt=0;cpt<TotalOrdenes();cpt++)

{

OrderSelect(cpt, SELECT_BY_POS, MODE_TRADES);

if(OrderSymbol()==Symbol() && StrToDouble(OrderComment())==InitialPrice)

{

if(OrderType()==OP_BUY) profit+=(Bid-OrderOpenPrice())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELL) profit+=(OrderOpenPrice()-Ask)/Point*OrderLots()/LOTS;

}

}

return(profit);

}

si no

{

if(Goal==OP_BUY)

{

for(cpt=0;cpt<OrdersTotal();cpt++)

{

OrderSelect(cpt, SELECT_BY_POS, MODE_TRADES);

if(OrderSymbol()==Symbol() && StrToDouble(OrderComment())==InitialPrice)

{

if(OrderType()==OP_BUY) profit+=(OrderTakeProfit()-OrderOpenPrice())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELL) profit-=(OrderStopLoss()-OrderOpenPrice())/Point*OrderLots()/LOTS;

if(OrderType()==OP_BUYSTOP) profit+=(OrderTakeProfit()-OrderOpenPrice())/Point*OrderLots()/LOTS;

}

}

return(profit);

}

si no

{

for(cpt=0;cpt<TotalPedidos();cpt++)

{

OrderSelect(cpt, SELECT_BY_POS, MODE_TRADES);

if(OrderSymbol()==Symbol() && StrToDouble(OrderComment())==InitialPrice)

{

if(OrderType()==OP_BUY) profit-=(OrderOpenPrice()-OrderStopLoss())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELL) profit+=(OrderOpenPrice()-OrderTakeProfit())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELLSTOP) profit+=(OrderOpenPrice()-OrderTakeProfit())/Point*OrderLots()/LOTS;

}

}

return(profit);

}

}

}

bool EndSession()

{

int cpt, total=Total de pedidos();

for(cpt=0;cpt<total;cpt++)

{

Sleep(3000);

OrderSelect(cpt,SELECT_BY_POS,MODE_TRADES);

if(OrderSymbol()==Symbol() && OrderType()>1) OrderDelete(OrderTicket());

else if(OrderSymbol()==Symbol() && OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,3);

else if(OrderSymbol()==Symbol() && OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,3);

}

if(!CONTINUE) Enter=false;

return(true);

}

double getPipValue(double ord,int dir)

{

double val;

ActualizarTarifas();

if(dir == 1) val=(NormalizeDouble(ord,Digits) - NormalizeDouble(Ask,Digits));

else val=(NormalizarDoble(Oferta,Dígitos) - NormalizarDoble(ord,Dígitos));

val = val/Point;

return(val);

}

//========== FUNCIÓN takeProfit

void takeProfit(int current_pips, int ticket)

{

if(OrderSelect(ticket, SELECT_BY_TICKET))

{

if(current_pips >= nextTP && current_pips < (nextTP + Target_Increment))

{

if(OrderType()==1)

{

if(OrderClose(ticket, MAX_LOTS, Ask, 3))

nextTP+=Incremento_de_objetivo;

si no

Print("Error al cerrar la orden : ",GetLastError());

}

else

{

if(OrderClose(ticket, MAX_LOTS, Bid, 3))

nextTP+=Incremento_de_objetivo;

si no

Print("Error al cerrar la orden : ",GetLastError());

}

}

}

}

 
hkstar98:
Hai,

Hay alguien en este gran foro, podría modificar este EA sin ninguna pérdida de la parada.

Gracias

//---- parámetros de entrada ---------------------------------------------+

extern int INCREMENTO=35;

extern double LOTS=0.1;

extern int NIVELES=3;

extern double MAX_LOTS=99;

extern int MAGIC=1803;

extern bool CONTINUE=true;

extern bool MONEY_MANAGEMENT=false;

extern int RISK_RATIO=2;

//+------------------------------------------------------------------+

bool UseProfitTarget=false;

bool UsePartialProfitTarget=false;

int Incremento_de_objetivo = 50;

int Primer_objetivo=20;

bool UseEntryTime=false;

int EntryTime=0;

//+------------------------------------------------------------------+

bool Enter=true;

int siguienteTP;

int init()

{

//+------------------------------------------------------------------+

nextTP = Primer_Objetivo;

//+------------------------------------------------------------------+

return(0);

}

//+------------------------------------------------------------------+

//| función de desinicialización experta ||.

//+------------------------------------------------------------------+

int deinit()

{

return(0);

}

//+------------------------------------------------------------------+

//| función de inicio experta ||

//+------------------------------------------------------------------+

int inicio()

{

int ticket, cpt, profit, total=0, BuyGoalProfit, SellGoalProfit, PipsLot;

double ProfitTarget=INCREMENT*2, BuyGoal=0, SellGoal=0, spread=(Ask-Bid)/Point, InitialPrice=0;

//----

if(INCREMENTO<MarketInfo(Símbolo(),MODO_STOPLEVEL)+spread) INCREMENTO=1+MarketInfo(Símbolo(),MODO_STOPLEVEL)+spread;

if(MONEY_MANAGEMENT) LOTS=NormalizeDouble(AccountBalance()*AccountLeverage()/1000000*RISK_RATIO,0)*MarketInfo(Symbol(),MODE_MINLOT);

if(LOTS<MarketInfo(Symbol(),MODE_MINLOT))

{

Comment("No hay suficiente margen libre para empezar");

return(0);

}

for(cpt=1;cpt<LEVELS;cpt++) PipsLot+=cpt*INCREMENTO;

for(cpt=0;cpt<OrdersTotal();cpt++)

{

OrderSelect(cpt,SELECT_BY_POS,MODE_TRADES);

if(OrderMagicNumber()==MAGIC && OrderSymbol()==Symbol())

{

total++;

if(!InitialPrice) InitialPrice=StrToDouble(OrderComment());

if(UsePartialProfitTarget && UseProfitTarget && OrderType()<2)

{

double val=getPipValue(OrderOpenPrice(),OrderType());

takeProfit(val,OrderTicket());

}

}

}

if(total<1 && Enter && (!UseEntryTime || (UseEntryTime && Hour()==EntryTime))

{

if(AccountFreeMargin()<(100*LOTS))

{

Print("No hay suficiente margen libre para empezar");

return(0);

}

// - Abrir cheque - Iniciar ciclo

PrecioInicial=Precio;

SellGoal=PrecioInicial-(NIVELES+1)*INCREMENTO*Punto;

BuyGoal=PrecioInicial+(NIVELES+1)*INCREMENTO*Punto;

for(cpt=1;cpt<=NIVELES;cpt++)

{

OrderSend(Symbol(),OP_BUYSTOP,LOTS,InitialPrice+cpt*INCREMENT*Point,2,SellGoal,BuyGoal,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS)),MAGIC,0);

OrderSend(Symbol(),OP_SELLSTOP,LOTS,InitialPrice-cpt*INCREMENT*Point,2,BuyGoal+spread*Point,SellGoal+spread*Point,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS),MAGIC,0);

}

} // la configuración inicial está hecha - todos los canales están configurados

else // Tenemos órdenes abiertas

{

BuyGoal=PrecioInicial+INCREMENTO*(NIVELES+1)*Punto;

SellGoal=PrecioInicial-INCREMENTO*(NIVELES+1)*Punto;

total=Historia de pedidosTotal();

for(cpt=0;cpt<total;cpt++)

{

OrderSelect(cpt,SELECT_BY_POS,MODE_HISTORY);

if(OrderSymbol()==Symbol() && OrderMagicNumber()==MAGIC && StrToDouble(OrderComment())==PrecioInicial){EndSession();return(0);}

}

if(UseProfitTarget && CheckProfits(LOTS,OP_SELL,true,InitialPrice)>ProfitTarget) {EndSession();return(0);}

BuyGoalProfit=CheckProfits(LOTS,OP_BUY,false,InitialPrice);

SellGoalProfit=CheckProfits(LOTS,OP_SELL,false,InitialPrice);

if(BuyGoalProfit<ProfitTarget)

// - Lotes Incrimentados Comprar

{

for(cpt=LEVELS;cpt>=1 && BuyGoalProfit<ProfitTarget;cpt--)

{

if(Ask<=(InitialPrice+(cpt*INCREMENT-MarketInfo(Symbol(),MODE_STOPLEVEL))*Point)

{

ticket=OrderSend(Symbol(),OP_BUYSTOP,cpt*LOTS,InitialPrice+cpt*INCREMENT*Point,2,SellGoal,BuyGoal,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS)),MAGIC,0);

}

if(ticket>0) BuyGoalProfit+=LOTS*(BuyGoal-InitialPrice-cpt*INCREMENT*Point)/Point;

}

}

if(SellGoalProfit<ProfitTarget)

// - Incrementa los lotes de venta

{

for(cpt=LEVELS;cpt>=1 && SellGoalProfit<ProfitTarget;cpt--)

{

if(Oferta>=(PrecioInicial-(cpt*INCREMENTO-MarketInfo(Símbolo(),MODO_STOPLEVEL))*Punto))

{

ticket=OrderSend(Symbol(),OP_SELLSTOP,cpt*LOTS,InitialPrice-cpt*INCREMENT*Point,2,BuyGoal+spread*Point,SellGoal+spread*Point,DoubleToStr(InitialPrice,MarketInfo(Symbol(),MODE_DIGITS)),MAGIC,0);

}

if(ticket>0) SellGoalProfit+=LOTS*(InitialPrice-cpt*INCREMENT*Point-SellGoal-spread*Point)/Point;

}

}

}

//+------------------------------------------------------------------+

Comentario("mGRID EXPERT ADVISOR ver 2.0\n",

"FX Acc Server:",AccountServer(),"\n",

"Fecha: ",Mes(),"-",Día(),"-",Año()," Hora del servidor: ",Hora(),":",Minuto(),":",Segundos(),"\n",

"Tamaño mínimo del lote: ",MarketInfo(Symbol(),MODE_MINLOT),"\n",

"Saldo de la cuenta: $",AccountBalance(),"\n",

"Símbolo: ", Symbol(),"\n",

"Precio: ",NormalizeDouble(Bid,4),"\n",

"Pip Spread: ",MarketInfo("EURUSD",MODE_SPREAD),"\n",

"Incremento=" + INCREMENTO,"\n",

"Lotes: ",LOTS,"\n",

"Niveles: " + NIVELES,"\n");

return(0);

}

//+------------------------------------------------------------------+

int CheckProfits(double LOTS, int Goal, bool Current, double InitialPrice)

{

int beneficio=0, cpt;

if(Current)//devuelve el beneficio actual

{

for(cpt=0;cpt<TotalOrdenes();cpt++)

{

OrderSelect(cpt, SELECT_BY_POS, MODE_TRADES);

if(OrderSymbol()==Symbol() && StrToDouble(OrderComment())==InitialPrice)

{

if(OrderType()==OP_BUY) profit+=(Bid-OrderOpenPrice())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELL) profit+=(OrderOpenPrice()-Ask)/Point*OrderLots()/LOTS;

}

}

return(profit);

}

si no

{

if(Goal==OP_BUY)

{

for(cpt=0;cpt<OrdersTotal();cpt++)

{

OrderSelect(cpt, SELECT_BY_POS, MODE_TRADES);

if(OrderSymbol()==Symbol() && StrToDouble(OrderComment())==InitialPrice)

{

if(OrderType()==OP_BUY) profit+=(OrderTakeProfit()-OrderOpenPrice())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELL) profit-=(OrderStopLoss()-OrderOpenPrice())/Point*OrderLots()/LOTS;

if(OrderType()==OP_BUYSTOP) profit+=(OrderTakeProfit()-OrderOpenPrice())/Point*OrderLots()/LOTS;

}

}

return(profit);

}

si no

{

for(cpt=0;cpt<TotalPedidos();cpt++)

{

OrderSelect(cpt, SELECT_BY_POS, MODE_TRADES);

if(OrderSymbol()==Symbol() && StrToDouble(OrderComment())==InitialPrice)

{

if(OrderType()==OP_BUY) profit-=(OrderOpenPrice()-OrderStopLoss())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELL) profit+=(OrderOpenPrice()-OrderTakeProfit())/Point*OrderLots()/LOTS;

if(OrderType()==OP_SELLSTOP) profit+=(OrderOpenPrice()-OrderTakeProfit())/Point*OrderLots()/LOTS;

}

}

return(profit);

}

}

}

bool EndSession()

{

int cpt, total=Total de pedidos();

for(cpt=0;cpt<total;cpt++)

{

Sleep(3000);

OrderSelect(cpt,SELECT_BY_POS,MODE_TRADES);

if(OrderSymbol()==Symbol() && OrderType()>1) OrderDelete(OrderTicket());

else if(OrderSymbol()==Symbol() && OrderType()==OP_BUY) OrderClose(OrderTicket(),OrderLots(),Bid,3);

else if(OrderSymbol()==Symbol() && OrderType()==OP_SELL) OrderClose(OrderTicket(),OrderLots(),Ask,3);

}

if(!CONTINUE) Enter=false;

return(true);

}

double getPipValue(double ord,int dir)

{

double val;

ActualizarTarifas();

if(dir == 1) val=(NormalizeDouble(ord,Digits) - NormalizeDouble(Ask,Digits));

else val=(NormalizarDoble(Oferta,Dígitos) - NormalizarDoble(ord,Dígitos));

val = val/Point;

return(val);

}

//========== FUNCIÓN takeProfit

void takeProfit(int current_pips, int ticket)

{

if(OrderSelect(ticket, SELECT_BY_TICKET))

{

if(current_pips >= nextTP && current_pips < (nextTP + Target_Increment))

{

if(OrderType()==1)

{

if(OrderClose(ticket, MAX_LOTS, Ask, 3))

nextTP+=Incremento_de_objetivo;

si no

Print("Error al cerrar la orden : ",GetLastError());

}

else

{

if(OrderClose(ticket, MAX_LOTS, Bid, 3))

nextTP+=Incremento_de_objetivo;

si no

Print("Error al cerrar la orden : ",GetLastError());

}

}

}

}

Hola

aquí tienes

Archivos adjuntos:
new.mq4  8 kb
 

codersguru:
jdun,

El código de SL & TP ya está escrito en este EA:

Mira estas líneas:

if (Symbol()=="GBPUSD") {

PipsForEntry= 13;

TrailingStop = 40;

TakeProfit = 45;

InitialStopLoss=33;

} else if (Symbol()=="EURUSD") {

PipsForEntry= 13;

TrailingStop = 30;

TakeProfit = 45;

InitialStopLoss=23;

} else if (Symbol()=="USDCHF") {

PipsForEntry= 13;

TrailingStop = 30;

TakeProfit = 45;

InitialStopLoss=15;

} else {

PipsForEntry= 13;

TrailingStop = 30;

TakeProfit = 45;

InitialStopLoss=30;

} [/PHP]

If you want to make SL & TP external variables which you can set, you have to comment the above lines of code and uncomment these lines:

[PHP]/*

extern int PipsForEntry= 5;

extern double TrailingStop = 40;

extern double TakeProfit = 120;

extern double InitialStopLoss=50;

*/
 

maximo de operaciones por señal

¿Alguien sabe lo que podría utilizar para limitar el número de operaciones por señal (me gustaría una operación por señal, pero estoy recibiendo como 8 y el último siempre es un perdedor)

 

Ayuda

Hai,

Todavía hay un stop loss

pghiaci:
Hola, aquí tienes
 

¿AE con múltiples tiempos personalizados?

Me doy cuenta de una EA se puede hacer w / múltiples marcos de tiempo, pero puede uno ser escrito w / tiempos personalizados? Tengo un EA con MTF pero necesito tiempos personalizados y no por defecto para que no se "alineen" tan a menudo.

saludos

Razón de la queja: