Raizzo77.

Specifiche

------------------------------------------------------------------+
//|                                                      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);
  }
//+-----------------------------------------

File:

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

Con risposta

1
Sviluppatore 1
Valutazioni
(5)
Progetti
13
77%
Arbitraggio
0
In ritardo
0
Gratuito
Ordini simili
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
Hi, I am experiencing several issues with the current bot system and would like to implement a fully automated and improved version with the following features: 1. Dynamic selection of best two timeframes: • Currently, sometimes M15 gives a sell signal while M5 gives a buy signal. • I want the bot to automatically select the best two timeframes that are aligned with the SMC H1 trend to generate the signal. • This
Zaki boot 30+ USD
//+------------------------------------------------------------------+ //| XAUUSD Safe Scalp - TP $2 / SL 60 points | //+------------------------------------------------------------------+ #include <Trade\Trade.mqh> CTrade trade; // ===== Inputs ===== input double LotSize = 0.01; input int StopLoss = 60; // points input double DollarTP = 2.0; // ربح بالدولار input int MAPeriod = 50; input
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
hello great developer I’m hiring a developer to build a local-only trade copier that sends trades from MT4 and MT5 to NinjaTrader 8 (NT8) in real-time. This copier must be reliable, fast, and fully executable without cloud dependence. I require a short test/demo period before full delivery to ensure quality and performance. here is the full project specs in the file check it please
I need a reliable, clean-coded Expert Advisor built for both MetaTrader 4 and MetaTrader 5 platforms. Main trading behavior: The EA follows buy and sell arrows produced by my custom indicator. Whenever a buy arrow shows up on the chart: if a sell position is currently open → close that sell immediately and enter a buy trade in its place. Whenever a sell arrow appears: if a buy position exists → close the buy and
Hello I'm looking for professional to create a robot to me that will enter us30 or nasdaq around 16H29-minute55-Second New York session opening Monday to Friday and put stop loss 3800 points away from entry hedging strategy
*I am looking for an experienced MQL5 developer to build a custom Expert Advisor (EA) for MetaTrader 5 based on my proprietary trading strategy. The full strategy details will be shared privately with the selected developer after agreement. The EA must be designed for automated trade execution with a strong focus on accuracy, speed, and stability. It should support flexible input settings and allow for future
📋 Project Description I am looking for an experienced MT5 (MQL5) developer to code a fully automated Expert Advisor for NASDAQ (US100) based on a fixed, rule-based opening range breakout strategy. The strategy is mechanical, uses no discretionary logic, and must be coded exactly as specified below. 🕒 Time & Session Rules Market: NASDAQ (US100) Trading days: Monday–Friday Session open: 9:30 EST EA must convert

Informazioni sul progetto

Budget
30 - 60 USD
Scadenze
da 1 a 60 giorno(i)