The same EA works fine on Instaforex and ICMarkets. but it does not work when I attached the EA to the charts of BTG MT4. I put a Print just before OrderSend() function, the print message shows buy/sell signals are generated as expected, but the OrderSend() mysteriously stops working. Autotrade is...
I am making narrow range with last four candles in narrow range and enter buy if high crosses above narrow range created by last four candles. Its very simple ea. created ea with help of online ea generator, but it has limitations so high low within 2 % OF LAST FOUR CANDLES simple code is as follows
I have attached the file below but it not able to load on my MT4. Please can you help me with that. i tried to run it on the meta editor and it some errors . Can anyone help me to fix this? Thanks in Advance. Regards
Hi Experts, I am trying to get the values from the buffers from this indicator using iCustom with the following line: input int Bars_Before = 5; // Fractal Bars Beforeinput int Bars_After = 10; // Fractal Bars Beforedouble FractalUP =
Hi, I am using an EA on several charts. Sometimes it happens that it will open two orders (from different charts) within the same second. My brooker just allow one trade every 5 second so i need to somehow delay orders. Since the ea is not open for edit, is there a way to run a script or such to
[Deleted]
Is there an easier way to find the median value in a time series array? Currently I copy the array, sort the copy and then select the median. Seems longwinded but couldn't find any standard functions to achieve the same thing. Anything better? Thanks V
I am a new coder in MQL4. I am working on an EA that will delete all pending orders after a single pending BuyStop or SellStop order is executed and changed to a Buy or Sell. My results are mixed, it seems it is working if the Sell Stop is executed to a Sell, the Buy Stop is deleted. However, if a...
Under what circumstances does a trade opened by an EA get closed prematurely without reaching the TP or SL levels?
(11 1 2)
Hey Guys, The strategy works well in manual trading in both a trending or ranging market but due to work commitments, I've decided to convert it into an EA after learning mql4 coding for a couple of years. The EA is run on M30, H1 or H4 chart where a trade is opened after the first tick of a new
Hello.. good day.. please is something wrong with my codes.. am trying to code EA to identify Fibonacci levels that are manually plotted from insert>Fibonacci>Retracement.. The EA is not placing the stoploss and takeprofit!! at those levels.. the entry signals are wrong.. my entry signal The First
Closing all open trades automatically results in losing price value even when the difference is positive profits
(49 1 2 3 4 5)
Hi guys, A noob programmer here in MQL4, though I have successfully made a few EAs and indicators. I have somewhat of a dilemma and some of you might find it of interest, and most likely have encountered this as well, though I trried to find a similar topic and can't find anything close to it
Hi ...Whenever i put a 2nd order for the same currency different size it assign automatically the same stop loss and take profit of the 1st order .Try to change it same think both orders having same SL and Tp . Anyone had same issue and know the Fix
Hi, i'm trying to get the value of the candle of the last MACD cross. I found this conversation that might work for me, but it seems it's for mt5 and I need it for mt4. https://www.mql5.com/en/forum/158877 I attach the code found so you don't need to look for it :) int find_XX_cross(int iBeg=0){
[Deleted]
for example,I open a chart window of a symbol, can I change the symbol of the chart window by keyboard upwards or downwards according to the market watch list.I mean when I press a certain key, the chart window will show the next symbol. Thanks!
enjoy any suggestions, please? there are lots of comments in the code, not really complete sentences and such, just notes about the thought process
Good evening All I am new to the whole MT4 setup and just started using it - have been using IG Markets platform for a while. I want to show a line with daily Closing prices in the same window and scale as the Candle Sticks. Looks like MT4 allows either of the two but not both. Maybe someone knows
Hello everyone, I have successfully coded a script that opens positions with a difference of 150 points. My EA opens a buy position every time "Ask>=Price of last buy opened +150_Points" while(Ask>=B1+(X*PositionB)*_Point && Buy1==1) { PositionB=PositionB+1; OrderSend
Hello everyone, I am having a hard time writing the perfect code for what I want. Basically I have the following scenario: Candle 1: 12:00:00: Indicator value=5 12:03:24: Indicator value=5.2 12:04:59: Indicator value=5.5 Candle 2: 12:05:00: Indicator value=6 12:09:59: Indicator value=8 Candle 3
Hello guys!!! I found an indicator here on the fórum that return several errors when I try to compile it and I have no clue how to fix those errors. On the same page, seems that was the file compiled already, but this one seems to have errors on the alert generation. The arrows itself change when I
Hi Folks, So I'm setting arrays, in particular I want to remember which pairs and profit for that pair per individual trade, which appear to be a problem already. I can't seem to have a String and Double Array, so Pairs[string 1][ double 1][double 1]; or Pairs[1][1][1] appears to be not possible? I
Hi, I downloaded the Dukascopy 1D data (Bid and Ask) form the JForex platform and I am trying to import it into MT4. I want to backtest using this data and I don't know if I should download the 1M data and then transform it to all timeframes? My strategy is only for the daily chart and I will
hey guys, I want to use f12 in backtesting and learn price action at the same time. Is there a way to switch between mtf without the chart skipping into the future? Or what would be the best way backtesting with mtf? Thanks
Hi, I have an issue with MT4... I opened a SELL position on GBPUSD with SL and TP and MT4 closed the position 8 pips above TP. As a result, the trade ended as a loss. I have attached the trade history and the journal. Trade number is 44846559, GBPUSD SELL with SL 1.24826 and TP 1.23287 The trade was
[Deleted]
Hi, First of all, sorry for my bad English, bot does anyone could help me here please ?! :) I would like to know how to use my EA on my own VPS H24 ? Is it possible or not ? How ? I want to be able to drive my own EA on my own VPS H24, but how? I will have to connect my EA to a lot of trading
Hi... I need to limit number of opened orders in an asset AND limit one order per candle too. See my code... it's allowing more than one orders per candle. I fixed it to allow 2 orders, but only one per candle: input bool LimitBar=true; // Limitar 1 ordem por vela?input int MaxOrders = 2;int...
This indicator is working except for that it will not update on each new bar. I have to reload the indicator for it to update. I know the solution is somewhere in the Start function, and because i am not a programmer I have failed to try and fix it. Could someone tell me what section of the code to...
Hi everyone, I'm a newbie who recently started learning MQL4. I've been struggling with the problem below for quite a while now without success. Basically what I'd like to achieve is having the OBV indicator with a moving average in a separate indicator window. I used the OBV.mq4 for a start and
HI, please give me some advice. Below is the code sample to select the 2nd oldest opened order. I want to do similar things. I want to put ticket number and order profit in 2-dimentinal array. For example, [Ticket# , Profit] #12, $12, #14, -$1, ....... I see that I can use for next roop code to
Hello I am backtesting an EA and a strange problem is happening to me. When I set it with autolots for 0.01 lot for each 500 balance, with 10,000 starting balance, it works perfectly backtesting in "Open Prices Only " mode, no 131 error or any kind of issues. Now, with exactly same settings, but
I am trying to understand the logic behind the half-trend indicator so I can port it to python. But since I don't know much about MQL4 , it's a bit difficult to understand how this indicator works. Can somebody explain it to me please ? Thanks
[Deleted]
Hello there My EA requires counting the bars after an order has opened (measure MACD values against a 'sloping' (changing) value (not the signal)). This is what i thought (my problem): get the Order Open Time - OOT - (in seconds),datetime OOT=OrderOpenTime(); get the current time - Bar 0, int...

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
If you do not have an account, please register
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.