MQL4 and MetaTrader 4 - page 159

[Deleted]
How can I open a separate Window in an Expert Advisor? Thanks.
Hello, my first post in the forum so apologies if anything is unclear. I've written an EA to place an order based on a number of conditions, with a Stop Loss and Take Profit when the order is placed. My question is: in a single candle, if the candle hits both the Stop Loss and Take Profit, will the
hello friend , Recently, I encountered a very confused problem. int year = TimeYear(TimeCurrent()); int month = TimeMonth(TimeCurrent()); int day = TimeDay(TimeCurrent()); string s = (string)year + "." +(string)month + "."+(string)day + " " + (string)00+":00"; datetime firstBarTm =
I'm new to indicators. I'd need to find the open/close of the previous candle on my indicator. It's basically an indicator that shows buy/sell arrows on the chart. I want to check 2 previous candles and if there is an engulfing candle I highlight with an arrow: I'm using this code but it errors that
I am running a MT/EA to send message through gmail SMTP server. This function had work fine for long time. Recently I switched to Windows 10 and used Windows defender as the anti-virus protection.But the EA send message function does not work. Does anyone have any ideas how to let MT send message...
What is the work of the ResetLastError() function? Must one get an error to call the ResetLastError() or is it called in anticipation of an error or is it called where an error cannot be tolerated, e.g. where an open order has to close whatsoever in order to open another order to avoid multiple open
  Invalid TP/SL  (3)
I'm trying to understand error I recently started to receive that causes my EA to stop. The EA works perfectly but once in few days i get error "Invalid TP/SL". I've checked my EA TP and SL and as you can see there is no SL but only TP. After checking and verifying that, I've found that the EA
So I have an ea that I can run in any timeframe and it doesnt matter because it gathers data from multi time frames to generate the trades. It works fine when running it live on my mt4 but when i download data and run strategy tester the ea (which shows me the values in the tf’s) doesn’t work with
Can it be done? Can anyone help me? What should I change in the code? Thanks
Good evening, with Google and the documentation in this forum I solved a lot of my beginner problems, but now I'm stuck and I would really appreciate the help from the experts. I like Heiken Ashi and as a programming exercise I added a Price Action Channel and a bar counter, which counts the number
Symbol EURUSD MarketInfo(Symbol(),MODE_STOPLEVEL) 20 OrderType: OP_SELL OrderOpenPrice: 1.13667 Bid: 1.1347 NewStoplossPrice: 1.13473 ------------------------------------------------------------------------------- this is my ordermodify parament! Stoploss price appropriate mini MODE_STOPLEVEL,why
Quick question: What takes less milliseconds to process? macd_signal= iMACD (ChartSymbol(), PERIOD_D1 , 8 , 21 , 5 , PRICE_TYPICAL ,MODE_SIGNAL, 1 ) OnTick () { Print (macd_signal); Print (macd_signal+ 1 ); Print (macd_signal+ 2 ); Print (macd_signal+ 3 ); Print (macd_signal+ 4 ); Print
Hi, I am learning how to code, so I am struggling with some basic stuff. Normally I try to make a program that has only one trade open at the same time, with a already determined stoploss and takeprofit. I do not have to track these trades because all the variables are already set. This is probably
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