this is the code whit 2 errors
#include <stdlib.mqh>
int OnInit()
{
// Agregar aquí sus operaciones de inicialización
return(INIT_SUCCEEDED);
}
void OnDeinit(const int reason)
{
// Agregar aquí sus operaciones de finalización
}
int OnTick()
{
// Obtener el precio y el volumen de la acción
double precio = SymbolInfoDouble(Symbol(), SYMBOL_BID);
double volumen = MarketInfo(Symbol(), MODE_VOLUME);
// Calcular si el bot debe comprar o vender
bool decision = comprar_o_vender(precio, volumen);
// Realizar la operación si la decisión es True
if (decision == true)
{
OrderSend(Symbol(), OP_BUY, 1, precio, 3, 0, 0, "100");
}
else
{
- Problems with my EA - HELP ME PLEASE!!
- Problem with "{}" help please!
- Error type cannot convert enum
Use styler and indentation when writing codes and you will never have similar problems into the future.
int OnInit() { return(INIT_SUCCEEDED); } void OnDeinit(const int reason) { } int OnTick() { double precio = SymbolInfoDouble(Symbol(), SYMBOL_BID); double volumen = MarketInfo(Symbol(), MODE_VOLUME); bool decision = comprar_o_vender(precio, volumen); if (decision == true) { OrderSend(Symbol(), OP_BUY, 1, precio, 3, 0, 0, "100"); } else {
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register