MQL4 and MetaTrader 4 - page 155

  plz help me  (2)
plz tell me mt4 code of below condition current candle volume > previous candle volume
can any one help why this code does not work for trailing stop for buy position?in compiler has no error but while back test the EA tester stop working. i want when the price increase 50point from open price then stoploss move 50point upward. double StopLossBuy = Bid- 100 * Point double buy=
Hi, I've got a real strange problem using a dll with MetaTrader: I've written a 2 Indicators and 1 dll. Both indicators call the dll to caclulate its values. Indicator 1 calls function1 from the dll to get its values and Indicator 2 calls function2 from the dll to get its values. Indicator 2 can...
[Deleted]
I am basing my indicator of the Ichimoku indicator and I need the values of Senkou Span A and Senkou Span B. The problem is that the indicator works for all the bars on the chart, but I the Senkou Span A and B are ahead or shift 26 periods forward and I can get my indicator to draw past the Bars on...
in my expert i want the distance between (open price-EMA)*2 for take profit?how can i do this in mql4
hello, I just wondering if there is a way that i can close the highest open position using OrderProfit() function because my strategy is once i maxed out the max trade out of my ea. the ea will close the highest profit order and open new order and it will repeat the process
[Deleted]
Hey all the readers! My programming skills are not that much good so i needed help.My problem is that i have placed two orders one is pending order and one is market order . i want that when market order reaches at its take profit value or price level reaches to take profit level of market order...
Hi all. Following code works correctly, except last line for minimizing dialog: CAppDialog AppWindow; int OnInit () { // Codes for dialog creation AppWindow.Run(); AppWindow.Minimized( true ); // not working as expected. return ( INIT_SUCCEEDED ); } Trying to use Minimize() method, it
  Problem with ZigZag indicator  (36   1 2 3 4)
Hello, I'm trying to develop an expert that digs the historical data (peak and bottoms) to be used for my main expert. I decided to use zigzag indicator since it's simple and finds the high/low easily. My problem is, when I call the ZigZag.ex4 using iCustom() function I cannot get the correct high
Hello, I am coding an EA which is supposed to open trades only if my indicator draw an arrow but sometimes it opens order without any arrow. Do you have an idea of this kind of issue? Thank you
Hello, I need to use the number of testing days within an ea (basically test end date - test start date) How can I get it ? Thank you
I was hoping someone might help me In the case whereby the (iHigh) and (iLow) in MQL4 finds the highest or the lowest price of a single candle, Is there a way or function i can use to find a common low or high price shared by a set number of previous candles and use the returned values to draw a
int OnInit () { //--- indicator buffers mapping SetIndexBuffer ( 0 ,SlopeBuffer); SetIndexBuffer ( 1 ,SMABuffer); //--- return ( INIT_SUCCEEDED ); } //+------------------------------------------------------------------+ //| Custom indicator iteration function |
  MT4 Profit Bug  (1)
HI guys, im testing an EA on my broker MT4, but i found out the result is abit strange, because the result is showing profit but when i look at the total amount of profit at below, it only shows a few dollars. Im not sure why, my broker is FBS Zero account with 1,000 USD and 1:500 Leverage, Its not
hi sir have an EA that creates horizontal lines and create a button when initiated. If the button is pressed an order will open and all the horizontal line that have created upon inititating the EA will be deleted buy ObjectDelete. For example i pressed the button on 1 min TF it do its job making an
Pleasant Day to everyone. I've been working on an indicator that shows when the current trend is at a Higher-High, Lower High, Lower-Low or Higher Low position. Indicated as HH or LH Text Above the Candles in Green and LL or HL Text Below the Candles in RED. The problem I'm having is that the text
The CCIMA EA uses Commodity Channel Index and Moving Average to enter the trade. The CCIMA EA can use to trade all kind of Forex, Indices, Commodity, Metal and Crypto Currencies inside the MT4 platform. Overview Trade direction based on MA trend up and down and CCI breakout from base level -100 and
  Uninit reason  (1)
Hi guys، I ruined my expert on my pc it works well, but I run it on VPS server it don't work, it gave me errors like uninnit reason 3,5. What I should to do
Can anyone help to resolve this is there a place where you can check the fault codes
[Deleted]
Is there another way to derive the body of the candle, rather then using moving average. double AvgBody( int ind) { double candle_body= 0 ; ///--- calculate the averaged size of the candle's body for ( int i=ind; i<ind+m_ma_period; i++) { candle_body+= MathAbs (Open[i]-Close[i]); }
Calling the system gui library and creating a simple dialog program initializes fine on mt4, but once the chart cycle is switched several times, it will be wrong, while on mt5 there is no such problem, everything is fine The code and images are in the attachment
  MT4 Backtest Bug  (4)
Hi guys, since yesterday my MT4 Strategy tester is becoming very strange... All the EA the i use for backtest will result like this. All price open at far from where it should be...Even using the MT4 original EA Moving Average, it also showing that, the buy price opens at super high then close at
HI together! I want to write eg the spread in a csv file line by line for different times (eg every 10 min), but cannot set the pointer to the correct line (= the next free line). It always writes the data into the same line. nevertheless i can read an open the file with notepad or Excel. But I...
I have a workspace with 4 charts that are set to sync on the same symbol. The purpose for this is to perform a different analysis for multiple time frames under the same symbol. For this to work, each chart in the workspace needs to share the same symbol, and be configured to use a separate account
  how Sleep() use?  (18   1 2)
hi, i do Sleep() in EA, why no useful? somebars=(Period()*60*1000); OrderSend(Symbol(),OP_SELL,LotsOptimized,Bid,3,0,0,"",MAGICMA,0,Blue); Sleep(somebars); Print(TimeCurrent()); but----------------------- 23:49:48 2005.02.04 10:24 ϵͳ1-3-7 EURAUD ,H1: open #7 sell 0.10 EURAUD at 1.68435 ok 23:49:48
Hello, I have a trendline on my chart which basically shows the trend of price and I have a horizontal line which stands for support or resistance. I want to calculate the  intersection of the trendline and the horizontal line Is there any way to do this with MT4?
  Obj_Hline Price  (3)
Hi guys I have a code the create horizonal line on chart, my problem is how can I get the price of where my horizontal line is located and save it to a variable, if I drag the HLine up or down the variable where the price is saved will updated. thank you
  For Loop & Array problem  (17   1 2)
Hi all, I would like to open my trades when a certain amount of figures is reached so that the EA can open x amount of trades. So for example: 2 figures 1 trade, 5 figures 2 trades, 7 figures 4 trades. I know there's is a way as i have tried using the following: for (a;a< 1 ;a++) for (a2;a2< 2
Does anyone know of a 3rd party that offers software/tick data for testing EAs? I'd love to have a second opinion. I have two brokers already that I run against but I'd like more data! I thought I remember running across something like this before I knew how to code MQL at all, but I cannot find it...
Error! Invalid file type uploaded, Grace.ex4 - Script. Your product's category is Experts, correct program type for it is Expert Advisor why say my EA is a script thanks