MQL4 and MetaTrader 4 - page 223

Hi write a simple indicator with a buffer inside: #property indicator_chart_window #property indicator_buffers 1 #property indicator_color1 clrBlue #property indicator_type1 DRAW_ARROW #property indicator_style1 STYLE_SOLID #property indicator_width1 3 double Morning[]; int newbars; int OnInit
Hey guys, i tried to make an EA out of an Indicator which show arrows on the chart or work with it. I want to buy ONCE at arrow up and sell when arrow down appears and sell at the same time again just ONCE. My EA buys like 50 times when an arrow appears an sells like a few seconds after it... my
Client Terminal Build and Version (32 or 64 bit) 32 build 701 Problem description CopyRates simple 2nd variation (by datetime,count) does not work Sequence of action Just a simple CopyRates string sym="GBPUSD"; datetime checkt=D'2014.09.22 04:00:00'; MqlRates rates[2]; int cpy=CopyRates(sym...
Hi guys, When I run my EA I have this error (OrderModify Error 1). Also there are some trades that get closed before they could be modified. So that you have an idea, TP and ST are at 30 pips (5 decimals broker) wich means 3 dolars of profit or loss. (0.01 Lots). When the price just reach 2.90,...
  WHY?  (3)
Why do the values on indicators differ between the chart and the Journal - or in other words why is there a difference between the values displayed in the indicator window and/or in the Data Window different than that reported in the Journal on which my transactions are based
Hi This should be simple, my code just draws an X under the OpenPrice of the last 100 candles. My code does this but it keeps clearing the previous X's I would like it to keep them on screen, as in I would like all 100 X's to stay on the screen. Thanks int x; string name = "text_object" ; void
for ( int x= 1 ;x< 50 ;x++) // GET CLOSES THAT ARE LOWER THAN PREVIOUS CANDLE'S CLOSE if ( iClose ( _Symbol , 0 ,x)< iClose ( _Symbol , 0 ,x+ 1 )) ClosesBelowPreviousArray[x]=x; // NOW WE ATTEMPT TO REMOVE ZEROS: for ( int x= 1 ;x< 50 ;x++) if (ClosesBelowPreviousArray[x]> 0
*****Problem Solved : Answer in #7 comment).***** --------------------------------------------------------------------------- Hey. I want to use iCustom to take ZigZag data for my variables. But after applying it to metatrader, it hangs up (not responding mode) and I have to close it. Mentioned part
Dear All, it happens that executing the EA in backtest inside MT4 build 1320 on Mex MB brocker the following order, with a ask=1.18401 is execute without error: OrderSend ( Symbol (),OP_BUYSTOP, 0.01 , 1.17983 ,Slippage, 0 , 1.18183 ,YourOrderComment,MagicNumber, 0 ,Green) The same above order with
Dear All, it happens that executing the EA in backtest inside MT4 build 1320 on Mex MB brocker the Print statement doesn't work inside OnInit(). By the way I tried to modify a global variabile inside the OnInit() and I can see the modification inside the OnTick() event, so I suppose the the OnInit()
It's executing the usemovetobreakeven() despite the code. Here are the photos
Hi With this code, I can close all the positions when, for example, (buy) when the profit is positive Now, when the close position is provided, I want the positions (buy) to be closed. If the profit is positive, it will be closed, plus the last position that is at a loss. I asked the professors for
[Deleted]
Hello How to change leverage in demo account ? Leverage was set at 1:100 and I want to change it at 1:5 Thank you.
  .chm file in MT4  (1)
hi, I'm using MetaEditor and MT4 via Wine and whenever I try to use the offline help, it crashes everything. Where would I locate the .chm file within the MT4 folders? I would like to access this with a CHM viewer. Thank you
all pending orders should be deleted if an active order is available ... what I'm doing wrong? for(pos = OrdersTotal()-1; pos >= 0 ; pos--) if (OrderSelect(pos, SELECT_BY_POS)&&  OrderMagicNumber()  == Magic&&  OrderSymbol()       == Symbol()){nOrders++;}if (OrdersTotal() > 0 &&...
Hello all please help me how to set text (trendline description) to my trendline?? this is my code: ObjectCreate("myObject", OBJ_TREND, 0, StartDate, price, EndDate, price); ObjectSet("myObject", OBJPROP_WIDTH, 1); ObjectSet("myObject", OBJPROP_COLOR, Red); ObjectSet("myObject",...
  API
Hi All, What API/Code is used have mt4 live trading resuts relfect onto myfxbook or anyvother trading matrix How do the two communicate? Thanks in advance
I am trading on VPS in EUR/USD with a fixed lot 0.01 and 60 c.u. on the "Always in the Market" principle on TF M1 without breaking forum rules and to avoid a ban or a "pre-ban". The maximum number of simultaneously opened orders is 200. The outcome of this experiment is also unknown to me. I implore
i am using EA, and i added Moving Average Indicator, now the applied price shows only PRICE_CLOSE to PRICE_WEIGHTED, but "Previous Indicator's data" is not available in the "stdlib". but it is available in metatrader. How to bring this to EA??...can anyone help me sort this out??....thanks in
Hi, This is the original mt4 Volumes Indicator. I would like somebody to help me change the color of neutral volume bars (open=close) to yellow. Or, if it’s an easy fix and you’re in mood to do it, I would appreciate it. Thank you, Attila
Hello, guys. How are you? I was finding an indicator that select the gaps -or in my trading methodology: Fair Value Gaps- but now I need to select the right bar of that gap. This is the code I am using for accomplish the gap: #property copyright "Akif TOKUZ and EarnForex.com" #property link
Hello, i'm new to mql programming so excuse me please, if the following is a stupid question. But i was trying around several hours without success. Perhaps sombody here couldhelp me. I want to draw  horizontal lines on certain levels, depending on the current close. For example: If current price is...
New article Graphical Interfaces I: Form for Controls (Chapter 2) has been published on mql5.com: This article is the continuation of the first part of the series about graphical interfaces. The first article Graphical Interfaces I: Preparation of the Library Structure (Chapter 1) considers in...
Hi all, I have this code for the BUY order trailing stop. //int counter = 0; if (OrderStopLoss() == 0 || (((Bid - OrderOpenPrice()) > stoplossPoint) && (OrderStopLoss() < (Bid - stoplossPoint)))) { double trailingStop = NormalizeDouble (Bid - stoplossPoint, Digits ); if ( MathMax
hi everyone i have an indiator i want to get signal from it please help me how can i get buy and sell signal from it thank you
//| RoNz Auto SL n TP.mq4|//| Copyright 2014, Rony Nofrianto |//| |//+------------------------------------------------------------------+#property copyright
I am re-installing MT4 but MT5 was being installed, my broker said, it's not compatible;what to do? please thanks
I am just learning to code mql4 and it appears as though there are no "and" "or" operators which are common to almost any programming language. In the mql4 documentation it gives the usual bitwise and logical operators but no "and" "or". Does this mean that all expressions comparing various...
hi all, I have 2 MT4 EAs, they are completely the same, except that one of them is using stop orders, and the other one is using market orders. In the strategy tester, the one that uses stop orders, is about 2 times slower than the other one. What is the reason for this? Is it possible to speed it
int OnInit () { IndicatorShortName( "Twiggs Money Flow - Balance:" + AccountBalance()); } Hi everyone Using the code above, if I insert indicator in chart it works correctly, when I close and reopen MT4, the indicator display balance 0, I must delete indicator and re-insert it into the chart... How