Raizzo77.

指定

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

附加的文件:

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

反馈

1
开发者 1
等级
(5)
项目
13
77%
仲裁
0
逾期
0
空闲
相似订单
I’m looking to turn into code. Trading Instrument - Crude Oil Futures (CL) Chart and Timeframe - 30-second chart Entry Setup 1. Time Focus on the first 30-second candle after 11:00:00 AM New York time. (11:00:00 candle) 2. Candle Size Limit : Skip the trade if the first candle is greater than 10 points. 3. Entry Orders - Place stop orders at the high and low of the first 30-second candle after 11:00:00. - Long Entry
Variable Inputs to be added Order Type : Market , Pending Trade Type : Buy, Sell , Buy & Sell Pending Pips Step : ( Pips Value can be negative or positive to decide on what type of Pending Order ) // If trade type Buy is selected Close Type : Close All ( Bulk Close Option in MT5 ) , Close Individually Close Option : %of Equity , %of Balance , Amount $ , %of No: of Trades Close Type : Buy Only , Sell Only , Buy & Sell
hello there I need a copy trade for mt4 can ANYONE help me with and let discuss on how to go about it kindly send me message to signify and let discuss mind you i need this urgently let connect to discuss and conclude
Below is the pine eidtor script convert it to MQL5 coding language and create bot based on following condition 1. This all should be on 5-minute chart timeframe 2. For Buy side, buy after closing of second candle when buy signal is given and hold buy position until sell signal is given. 3. For sell side, sell after closing of second candle when sell signal is given and hold sell position until next buy signal will be
I would like the better volume indicator 1.6 in a scanner format. Scanning multiple timeframe and pairs of which can be picked. Would like it to provide all standard notifications and also if pressed to go to the a template timeframe and pair. *To be placed in a table format as the one added. To be able to add which time frame you want to see. *To advise me of the following Climax High - turn the text green High
i have a JavaScript of a code which is a indicator of trading view, i want to convert into python script and make a mql5 automated trading bot which can take automatic trade and also exit when the signals come by the indicator
Here's the bot's trading strategy in a nutshell>>> I would like to make a simple scalping MT5 EA trading bot for the synthetic indices, specifically for the Boom 1000 Index. This MT5 EA trading bot will be based off of the 10 period moving average that follows specific rules for entry. The parameters of the moving average are as follows: Period:10 Shift:1 Method:Linear Weight Apply to:Close The bot will only initiate
I would like an existing, older MT4 EA I had developed converted into an MT5 EA and debugged where necessary. The EA is attached and should be fairly self-explanatory. It is a breakout order entry EA with customisable parameters
I require an MT4 Expert Advisor (EA) that automatically places hedge orders when a buy or sell order is placed by me or another EA. The hedge orders will consist of a stop order (either Buy Stop or Sell Stop), with the same lot size as the original order, deployed at a predefined price distance. The EA must ensure that only one hedge order is placed for each trade. The system should monitor trades based on specific
Renko EA 30 - 150 USD
I want a Renko EA similar to the one I have, because I want the source code. The Renko EA will have the mode presets described, the Renko EA will be live, it will be for MT5, it will be saved under Expert Advisors. Please see the attached file for specifications. Please let me know if you have any questions

项目信息

预算
30 - 60 USD
开发人员
27 - 54 USD
截止日期
 1  60 天