Offtop - página 11

 
De mi cuenta para hacer traden

L
 
Good morning community,

I have this code and it won't run, I would like someone to help me to correct the errors.

// define inputs

input int ma_period = 50;

input int rsi_period = 14;

input double rsi_level = 70;

input double profit_target = 100;

input double stop_loss = 50;


// define variables

double ma_current, ma_previous;

double rsi_value;


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

//| Expert initialization function                                   |

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

int OnInit()

{

   // initialize indicators

   ma_current = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 0);

   ma_previous = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 1);

   rsi_value = iRSI(_Symbol, _Period, rsi_period, PRICE_CLOSE, 0);

   

   return(INIT_SUCCEEDED);

}

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

//| Expert tick function                                             |

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

void OnTick()

{

   // update indicators

   ma_current = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 0);

   ma_previous = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 1);

   rsi_value = iRSI(_Symbol, _Period, rsi_period, PRICE_CLOSE, 0);

   

   // check for buy signal

   if (ma_current > ma_previous && rsi_value > rsi_level) {

      // place buy order

      double stop_loss_price = Bid - stop_loss * _Point;

      double take_profit_price = Bid + profit_target * _Point;

      int ticket = OrderSend(_Symbol, OP_BUY, lot_size, Ask, 3, stop_loss_price, take_profit_price, "Buy", MagicNumber, 0, Green);

      if (ticket > 0) {

         Print("Buy order placed successfully with ticket #", ticket);

      } else {

         Print("Error placing buy order: ", GetLastError());

      }

   }

   

   // check for sell signal

   if (ma_current < ma_previous && rsi_value < (100 - rsi_level)) {

      // place sell order

      double stop_loss_price = Ask + stop_loss * _Point;

      double take_profit_price = Ask - profit_target * _Point;

      int ticket = OrderSend(_Symbol, OP_SELL, lot_size, Bid, 3, stop_loss_price, take_profit_price, "Sell", MagicNumber, 0, Red);

      if (ticket > 0) {

         Print("Sell order placed successfully with ticket #", ticket);

      } else {

         Print("Error placing sell order: ", GetLastError());

      }

   }

}


 
Morizlion #:
Good morning community,

I have this code and it won't run, I would like someone to help me to correct the errors.

// define inputs

input int ma_period = 50;

input int rsi_period = 14;

input double rsi_level = 70;

input double profit_target = 100;

input double stop_loss = 50;


// define variables

double ma_current, ma_previous;

double rsi_value;


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

//| Expert initialization function                                   |

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

int OnInit()

{

   // initialize indicators

   ma_current = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 0);

   ma_previous = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 1);

   rsi_value = iRSI(_Symbol, _Period, rsi_period, PRICE_CLOSE, 0);

   

   return(INIT_SUCCEEDED);

}

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

//| Expert tick function                                             |

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

void OnTick()

{

   // update indicators

   ma_current = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 0);

   ma_previous = iMA(_Symbol, _Period, ma_period, 0, MODE_SMA, PRICE_CLOSE, 1);

   rsi_value = iRSI(_Symbol, _Period, rsi_period, PRICE_CLOSE, 0);

   

   // check for buy signal

   if (ma_current > ma_previous && rsi_value > rsi_level) {

      // place buy order

      double stop_loss_price = Bid - stop_loss * _Point;

      double take_profit_price = Bid + profit_target * _Point;

      int ticket = OrderSend(_Symbol, OP_BUY, lot_size, Ask, 3, stop_loss_price, take_profit_price, "Buy", MagicNumber, 0, Green);

      if (ticket > 0) {

         Print("Buy order placed successfully with ticket #", ticket);

      } else {

         Print("Error placing buy order: ", GetLastError());

      }

   }

   

   // check for sell signal

   if (ma_current < ma_previous && rsi_value < (100 - rsi_level)) {

      // place sell order

      double stop_loss_price = Ask + stop_loss * _Point;

      double take_profit_price = Ask - profit_target * _Point;

      int ticket = OrderSend(_Symbol, OP_SELL, lot_size, Bid, 3, stop_loss_price, take_profit_price, "Sell", MagicNumber, 0, Red);

      if (ticket > 0) {

         Print("Sell order placed successfully with ticket #", ticket);

      } else {

         Print("Error placing sell order: ", GetLastError());

      }

   }

}


Este foro en español. Por favor, escriba en este idioma, e introduzca el código de la forma correcta, hay una opción específica para ello. No duplique preguntas en distintos hilos. Y escriba en una entrada del foro con una duda similar, o cree su propia entrada. Gracias
 
chicas desnudas aquí => https://is.gd/MnIjkH
 
Hola no se mucho de la plataforma...cuánto genera el robot.
No sé instalar .. No se apretar un solo botón 
 
herror al abir un trade manual o con profundidad de mercado
 

Mi cuenta no aparece en la lista de señales, es pública. Abrí otra cuenta para suscribirme y practicar copytrading pero no aparece. 

Aunque dice: " Su Señal ha sido publicada y ya está disponible al público". Ayuda porfa, gracias.

 
Como canse lo una operacion
 
Hola buenas noches señores me he instalado la nueva versión de metatrader 5 i la hora de operar en modo de demostración ahora no se puede operar me dice operación rechazada i no entiendo el porqué ahora no puedo trabajar en demostracion?me podéis ayudarme con esto?
 
Thanks.
Razón de la queja: