MQL4 and MetaTrader 4 - page 139

Hi, An Auto Lot Size Calculation Function is working fine in scripts I checked using Alert function it is returning actual values in rounded format for Lot sizes. But When I am using it inside an EA it is returning 0 value and Error 4051 "invalid function parameter" pl guide where i am wrong
Hello, Please help me for get line by line symboles name form this string array. i want get symbol name from "ListSymbols" and put in a variabel and after proccess get next name . Thank you { //--- int HowManySymbols= SymbolsTotal ( true ); string ListSymbols= " " ; for ( int i= 0
I wanted to know how to update the graphic on the indicator or expert advisor properties 'about' tab. I found this: https://www.mql5.com/en/docs/basis/preprosessor/compilation but how do we include the graphic. Is there a max filesize for the graphic? Does the graphic have to be ico, or can we...
Dear all, How can I display multiple moving average lines (a moving average with multiple periods) with a single moving average indicator? Thanks a lot for your prompt reply
Who has script that enables one to close multiple trades in mt4 starting with the trades with the most profits to the the trades with the least profit
Hello, friends, I found this EA on ForexFactory. It's a very old thread, so this EA is about 12 years old hehe.. When I try to attach to a chart it's fine, but the minute I try to change it's settings, mt4 crashes..everytime. I tried to compile on metaeditor, but that didn't help.. 0 errors but a
I have a problem... I declared an array outside any function, so, the scope of this array is global. Execute the EA and I save and load data from this array on a pair, for example EURUSD without problems but, the problem is when I execute the same Expert Advisor on 2 or more pairs, the data is...
Hi there i want to connect to ExpertAdvisors to each other using a server : I want to Press sell button on one Ea and the other one Opens an sell order whats the best way to do this
Hello , I would like to ask if it is possible to count the new bars of a different Timeframe using IndicatorCounted() or another function .. for example, if I am on M15 and want the result of the counted bars on the Timeframe of H1 how to use IndicatorCounted to get this result
can anyone please help me, everytime i try and send a seller a message the box comes up but i cant type any message? any help would be appreciated
Hello guys I used this code to draw a horizontal line where Ichimoku SpanB goes flat : //--- input parameters of the script input string InpName= "HLine" ; // Line name input int InpPrice= 25 ; // Line price, % input color InpColor= clrRed ; // Line color
Hello everybody. Can I write my function like this. //--- Set the visibility only PERIOD_M15 and PERIOD_H1 ObjectSetInteger ( 0 ,highlevel, OBJPROP_TIMEFRAMES , OBJ_PERIOD_M15 | OBJ_PERIOD_H1 ); At the last parameter, we can input more than one value in the same parameter separate with "|"
Hello, I have written a code which is running as per my requirement in the demo account. However, when I wanted to perform a backtesting of the EA, it is giving me "OrderSend error 138" for all the trades. Is there a way to resolve this. if (TotalBuyOrdersCount(TradeSymbol)== 0 ) {
Hello All, I am trying to write a simple EA wherein the trade is picked based on the moving averages . However, if the trade goes beyong a certain loss (consider 100 pips) then it should pick the next lot size (for example the previous lot size X 2). I have written the code since I am using multiple
Can someone explain why my EA is no longer attaching to my MT4 chart?
Is there an indicator that would show me OHLC values on top left on the chart, instead of below the chart like it is now
some times,mt4 ordersend will respone 10s ,the windowchart also no respone! Is mt4 have similar to OrderSendAsync like mt5
hi guys I have a object Hline that gets the price value wherever i put the Hline on the chart then pass the price value on a label object to display its value. My problem is the value on my label only changes when my tick updates. I want it to get the value from my Hline instantly and not wait for
I ask the village party to post here, because your old branch is very slow
Print ("low 0 : ",DoubleToStr( iLow (Instrument, PERIOD_H1 , 0 ), 5 )); Print ("low 1 : ",DoubleToStr( iLow (Instrument, PERIOD_H1 , 1 ), 5 )); Print (" iLowest = ", IntegerToString ( iLowest (Instrument, PERIOD_H1 , MODE_LOW , 1 , 0 ))); result: 0 07:37:53.045 EA GBPUSD,H1: low 0 : 1.36055 0
In one of my EAs i use a Break-Even Trailing Stop that sets the SL below the bid/ask price to close the position with small profit if price goes above a certain profit threshold. However this causes Strategy Tester to include this situation as a win and therefore increases the percentages to
in this coding ATR Trailing for buy order is work but sell order not apply help me to solve error void TrailStops() { double ATR = iATR ( NULL , 0 , 14 , 0 ); double TrailingStop = ATR * 2 ; double minstoplevel = MarketInfo( _Symbol ,MODE_STOPLEVEL)* _Point ; double buyStopLoss
  pivot points  (14   1 2)
So I am trying to code pivot points. The idea I have is to check for a high/low of let's say the last 5 bars. Then what I would like to do is check to see if the previous 5 bar before that beat said high/low and continue checking that until the answer is false. I figure I would need a for loop but
Hi, Does anyone know if there is an EA/Script available that can set Equity SL or Trailing so that I can lock in profits. I have looked everywhere an cannot find one to fit my needs. Any help would be most valuable. Dave.
Looking for a way my EA can use a trailing stop based on equity for all trades via magic number EA. I would like it to work something like this: If equity profit = + 200, set equity stop (or equity trailing stop) at +100, target profit = +500. So if I do not hit my profit target of 500 cause market...
when i Create Database in mt4.How to Read\Write it? There have no comment at mt4 help,but exsist in mt5
  Working with MT4  (16   1 2)
Hello everyone, I am trying to install MT4 to integrate it with another App for a project related to my company. By default am getting the version 5, which is not the one that we'd like to go with. So my questions are: Is it possible to downgrade to the v4 ? And if so, is it compatible with the
i have one idea for developer metatrader mobile, i have seen a lot people try to overclaim trade with live account, but in fact they trade using demo accounts, and they try to deceive the public with screen shots of trading history, in fact it's all demo accounts. so I recommend for developers to
Hello I can read data from different websites, but investing.com is the only one where I have my problems. Does anyone have an idea? I tried it like this: void DataToFile() { string cookie= NULL ,referer= NULL ,headers; char post[],result[]; string calendar= "" ; string url=
I have an ea mq4 file, who knows how to program can add to this ea two features of time filtering and target daily ($) . Thank you very much