Raizzo77.

Tarea técnica

------------------------------------------------------------------+
//|                                                      Candles.mq4 |
//|                               Copyright 2020, Professoft Limited |
//|                                             https://www.mql5.com |
//+------------------------------------------------------------------+
#property strict
#property indicator_chart_window
#property indicator_buffers 2

input bool ShowEngulfingCandle = true;

#property indicator_type1 DRAW_ARROW
#property indicator_width1 1
#property indicator_color1 0xFFAA00
#property indicator_label1 "Buy"

#property indicator_type2 DRAW_ARROW
#property indicator_width2 1
#property indicator_color2 0x0000FF
#property indicator_label2 "Sell"

//--- indicator buffers
double         SBuffer[];
double         BBuffer[];

#define BuyArrows 0
#define SellArrows 1


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
//--- indicator buffers mapping
  IndicatorBuffers(2);
  SetIndexBuffer(BuyArrows,BBuffer);
   SetIndexEmptyValue(BuyArrows, EMPTY_VALUE);
   SetIndexArrow(BuyArrows, 233);
   SetIndexLabel(BuyArrows, "Buy");   
   PlotIndexSetInteger(BuyArrows,PLOT_ARROW,159);
   

   SetIndexBuffer(SellArrows,SBuffer);
   SetIndexEmptyValue(SellArrows, EMPTY_VALUE);
   SetIndexArrow(SellArrows, 234);
   SetIndexLabel(SellArrows, "Sell");
   PlotIndexSetInteger(SellArrows,PLOT_ARROW,159);
   
   
  
   
//---
   return(INIT_SUCCEEDED);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
  {
//---
    int barIndex,                           // Bar index
       Counted_bars;                // Number of counted bars
//--------------------------------------------------------------------
   
   int limit = rates_total - prev_calculated;
   if (prev_calculated > 0) limit++;
   
   for (int i = limit-1; i>=0; i--) {
       bool isBearish = Open[i] > Close[i];
       bool previousIsBearish = Open[i + 1] > Close[i + 1]; // PROBLEM IS HERE
                   
      if (isBearish && !previousIsBearish) {
          // sell buffer
          SBuffer[i]=High[i] + (10 * Point); 
      } else if (!isBearish && previousIsBearish) {
         // buy buffer
         BBuffer[i]=Low[i] - (10 * Point);  
      }
   }
   
//--- return value of prev_calculated for next call
   return(rates_total);
  }
//+-----------------------------------------

Archivos adjuntos:

EX5
Candles.ex5
8.4 Kb
MQ4
Candles.mq4
3.2 Kb

Han respondido

1
Desarrollador 1
Evaluación
(5)
Proyectos
13
77%
Arbitraje
0
Caducado
0
Libre
Solicitudes similares
Yash Agrawal 30+ USD
// Simple EMA Bot input int FastEMA = 9; input int SlowEMA = 21; void OnTick() { double fast = iMA(NULL,0,FastEMA,0,MODE_EMA,PRICE_CLOSE,0); double slow = iMA(NULL,0,SlowEMA,0,MODE_EMA,PRICE_CLOSE,0); if(fast > slow) { if(PositionsTotal()==0) OrderSend(Symbol(),OP_BUY,0.01,Ask,10,0,0); } if(fast < slow) { if(PositionsTotal()==0) OrderSend(Symbol(),OP_SELL,0.01,Bid,10,0,0); } }
Gold robot Ga1 30 - 200 USD
mport pandas as pd import numpy as np def detecter_tendance(data): # Code pour détecter la tendance pass def identifier_niveaux(data): # Code pour identifier les niveaux de support et de résistance pass def calculer_stop_loss(tendance, support, resistance): # Code pour calculer les stop loss pass def calculer_profils(tendance, support, resistance): # Code pour calculer les profils mport pandas as pd
I am seeking an experienced MQL5 developer to build a professional-grade Expert Advisor (EA) for XAUUSD. The strategy targets price action at psychological levels with a dual-unit (Banker/Runner) exit. Key Features Required: Percentage-Based Logic: All triggers, entries, SL, and TP must be calculated as a percentage of the current price Dual-Order Execution: Every entry must split into two separate tickets: Unit A
Martingale Strategy 50 - 70 USD
I need a gambling bot that implements the Martingale Strategy for betting on roulette. It will be used on platforms like Betcity and Unibet to manage bets effectively. Scope of work - Develop a bot that implements the Martingale Strategy for roulette. - Ensure compatibility with Betcity and Unibet platforms. - Include functionalities for adjusting bet size and managing losses. - Integrate platform-specific features
Dear Developers, I am seeking a professional developer to build an institutional-grade automated trading system that operates exclusively using pending orders, with advanced and fully customizable trade management logic. This is not a basic Expert Advisor. The goal is to create a structured, intelligent, and long-term trading system with clean architecture and professional execution standards. Project Requirements
Dear Developer, I am currently experiencing several structural and logical limitations in the existing bot system, and I am seeking a complete professional upgrade to a fully automated, intelligent trading solution. The objective is to preserve the core SMC strategy while significantly improving precision, automation, multi-timeframe alignment, and trade quality. Below are the required specifications: 1. Dynamic
Hello there Hpe you are doing good I am in search of a pine script expert developer who can build strategy in apudFlow in pinescript. Kinldy bid on this project if you can do this
I need a scalping-specific logic MT5 trading bot with a Donchian-channel–based dynamic stop-loss and take-profit system, applies RSI volatility filtering to avoid low-quality setups, and allows asset-specific adjustable parameters for fine-tuning performance Trading details: - Symbol: Any Forex EUR/USD - Platform: MT5 - Strategy type: Scalping (fast trades) - Timeframes: 5sec/ M1 / M5 - Fixed Stop Loss and Take
Looking for an experienced MQL5 developer to analyze and reverse-engineer the trading logic of an existing scalping Zone Recovery EA using Moving Averages and Bollinger Bands, and then rebuild it
EA Expert MTA 4 30+ USD
I have my own indicator and needs to create EA expert working smoothly with it to hit the targets as defined in indicator: Technical approach: - The EA will read the indicator signals using Copy Buffer on the selected timeframe - The EA should hit indicator variable targets factor -​Auto-Entry: Instant execution when the signal appears. ​-Alerts: Mobile Push Notifications + Pop-up alerts. -​Money Management Auto-lot

Información sobre el proyecto

Presupuesto
30 - 60 USD
Plazo límite de ejecución
de 1 a 60 día(s)