MQL4 and MetaTrader 4 - page 516

I have an ea that opens too many buys or sells on the same currency pair. I cannot find any script online that will prevent metatrader from opening a new order when for example their is already a buy on the pair or a sell on the pair. i want to prevent it from opening 2 buys or sells, like when one...
Hi, I'd like to compare iSAR indicator on more timeframes and also on a different symbol. It works properly for different timeframes of the current symbol. For the different symbol it returns correct value (see 1. variable usdind_01_sar). But if I will print it out or want to compare the value, the...
What is the best way to avoid the "possible loss of data..." error from this line?   int secs_remaining=(Time[0]+PeriodSeconds())-TimeCurrent(); 
Hi I'm trying to manipulate an indicator value, For example: if (a=(iRSI(NULL,0,14,PRICE_CLOSE,0)>75)) {    int b=a-3 }   The problem is that a returns true and not the value of the indicator (75). how to get the value of the indicator ? I know I can try:  if (a=(iRSI(NULL,0,14,PRICE_CLOSE,0)>75-3))...
Hello guys,  its a return of the comeback... Im still newbie in terms of trading... Does anyone know where i can a tutotrial how to make an EA in mt4?   Thank you!   Mc 
Hello, I am currently using an EA that places two line on the chart. When price touches the top one it order a buy order an the botton one a sell order.   Is it possible instead of using a fixed stop loss value, draw two other lines on the chart, one BuyOrderStopLoss and SellOrder StopLoss, so that...
I want to store current bid price to use later and update stored every specified seconds, Now can anyone tell me why my code does not update the stored price?   double time = 1000,price;   int TimeBar; //Fill price with Bid and record time    if (price==0)    {        if(price=NormalizeDouble(Bid...
Hey desperate for some help here!   trying to control the way indicator draws fibbo scales automatically and think ive perhaps gone about it the wrong way from the start.    I have it setting everything as buffers so the datawindow is populated with what I want. But what i need is for it to only...
//+------------------------------------------------------------------+ //|                                                                  | //+------------------------------------------------------------------+ void StopLoss_Management()   {...
I'm trying to install Oanda's MT4. I downloaded the installer from Oanda. When I attempt to run it, my cursor changes to the busy animation for a moment, and then nothing happens. If I examine task manager while running the setup file, I can see that the process starts, and then exits. I've
I wish to analyze a chart using Fibonacci indicator. Is there any methodologies (or libraries) that can draw of Fibonacci indicator automatically on a chart with MQL4?
Please can someone explain to me in simple terms the difference between StringToDouble() and StrToDouble() functions? The documents did not seem to differentiate between the two to my understanding.
Say I have two candles satisfy a property, I want to draw a rectangle around them like the following under custom indicator, what should I do? The [setIndexStyle][https://docs.mql4.com/customind/setindexstyle] does not seem to have this option.
Greetings! First time poster here. I have a bug that's nagging at me. It has to do with iRSI indicator, which is giving me funky results. Context: I have a chart running EA with the following method:   double getCurrentRSI(int timeFrame, ENUM_APPLIED_PRICE appPrice) {       double returnValue =...
I'm having trouble enforcing FIFO closing of positions in a fast moving market in MQL4. Based on other forum questions I keep a class array of my open orders sorted by OrderOpenTime. I use Limit Orders exclusively to open these positions. The order in which these limit orders can be triggered cannot
Hello, I want to place a button with mt4gui lib on the right side. And with this lib is not possible to choose the "CORNER _RIGHT_UPPER". So I have to recalculate the Chart size, but I don´t wanna do this every tick but if the chart window is resized only. I want to know if there is a trigger that...
Hi All, Just today , i got this error message which failed to copy the signal from my EA. Any1 know how to solve this issue? Thank You
Hello guys, I'm new to this forum. I was wondering, is it possible to develop extensions to the GUI? I have some experience working on a CAD tool and it would be nice to put it to good use in MT4.  Have a nice day, Andrei 
Hello I love to open trade in 00:00 time every odd days  but When it comes to holiday , order start in first week day that odd or non odd !!?  How can I fix it ? #define  DAY 2*86400 // day is 86400 seconds times to 2 and start from odd day #define  HOUR 3600 // hour is 3600 seconds #define  MINUTE...
Hi guys, I've been searching the forum and trying to pull apart scripts on the web. Documentation has only gotten me so far. I'm trying to get the current and previous position of M15, then zooming out to see what bar it resides inside of H1 and H4. Live trading I believe this will either be 0 or 1
Hello, I need to have a link functionality in MT4. How can I make an object, button or text on my chart which I can click and a website is opened in Browser? Thank you
// + ----------------------------------------------- ------------------- + // | CC.mq4 | // | CC | // | | // + ----------------------------------------------- ------------------- + #property copyright“CC” #property link“CC” #property version“1.00” #property strict #property script_show_inputs //
Hi, can someone help ? Can someone check if this code is correct? Description CCI A cross above 100 CCI B below 0 An alert should pop out when this 2 condition happen. #define UPPER_LEVEL 100 #define MIDDLE_LEVEL 0 #define LOWER_LEVEL -100 #define INDICATOR_NAME "iCCIAlert" if( cci1[0]
Hello How can i shift chart from the end more than of default state ? (shift end of the chart from right border!) Thanks so much
Hi All,   working on optimizing some indicators and an EA that ive been working on for some time. In strategy tester it is so slow its quicker to forward test it at times lol   I think the main problem is with the fib scale indicator it re-draws on every tick and really it only needs to re-draw when...
Hi All,   Working on a Multi Time frame stochastic oscillator tool that works well for me as a manual trading strategy ive integrated into part of my EA and it works fine forward testing it but I cant back test it using strategy tester.   Ive done a lot of modding of the code lately to really strip...
  OrderSend error #138  (11   1 2)
Hello, in backtest i get this order error 138.   This is my code.   RefreshRates();       MqlTick tick;       if(SymbolInfoTick(_Symbol,tick) == true)       {          double xbid = tick.bid;          double xask = tick.ask;          double point=SymbolInfoDouble(_Symbol,SYMBOL_POINT);...
Hey, I'm trying my hand at creating a simple alert indicator. I keep getting what look like simple syntax errors, but can't figure out what's wrong.    #property copyright "Me" #property link      "" #property version   "1.00" #property strict #property indicator_chart_window...
  Bid and Ask in backtest  (13   1 2)
Seems to be the same. Is this generally the case ? Also MqlRates spread == 0.   Is this normal ? Thank you 
Hello, am i alone with the problem that my expert gets not updated for backtest when changing the code, compiling without errors ? This happens sometimes. Deleting .ex4, running backest throws an error "tester cannot load..." So the correct EA is adressed. After compiling without error, so new .ex4...