MQL4 and MetaTrader 4 - page 309

[Deleted]
Hi Guys I'm having a problem drawing an Horizontal line on the chart (this is my first mq4 script ever...) while searching the forum, i saw a related bug fixed using an Object identifier inside the CreateObject function call (the "counter" bellow). I tried to add it to my code by it didn't help, let...
Hello, I am working on an EA in MQL4 that can have multiple open orders. When the EA creates a new order it then uses OrderModify to set TP & SL. When that happens, all open tickets get changed. Here is my code: bool modok = OrderSelect(pTicket,SELECT_BY_TICKET); if (!modok) {
hey guys i made an EA which i would give out and would love if anyone can optimize it to find the best settings for it. The first EA is combination of CCI and MA filter and second one was made with trend magic indicator <ex4 file removed >
hi in MT4 in trade chart at right of chart it shows whole trades profit in dollars I want it shows all trades profit in one day in pips how I can do it? Best Regards Neda
How do I download data from an indicator without an error? i is the loop from Bars-1 to 0tf = PERIOD_CURRENT;datetime dt = iTime(NULL,tf,i);int shift = iBarShift("EURUSD",tf,dt,true); Errors on M1 and H1: EURUSD,M1: Time 2020.04.10 23:58 iBarShift Error: 4051, i = 0, shift = 0 (the bar at 2020.04.10
Dear Forumers, I am beginning my EA codng journey by using the sample Moving Average given in the default MT4 to modify some basic functions. However, i am facing a problem when I ran the Strategy Tester. It seems like the BUY trade is not happening and only SELL trades are occurring. Can anyone
I read articles about it here at this forum, one in particular is this one (https://www.mql5.com/en/forum/154009). But so far it is not calculating as expected during Strategy Tester. My goal is to create a method to account the profits accrued during the time the EA is running and check if the the
Hello everyone. I am trying to use the modified MTF indicator to call a regular indicator but for some reason, when iterating through timeframes, I am only able to retrieve the current timeframes data. What am I doing wrong here? Thanks for any help! MTF indicator
#property strict#property indicator_chart_window#property indicator_buffers 2#property indicator_width1 5#property indicator_color1 Red#property indicator_width2 5#property indicator_color2 Reddouble Buffer_0[];double
...actually this is a question that's been concerning to me for a while now, are there cases when verifying OrderSelect() (i.e. to resolve the Warning) is actually a bad idea and I'd be better off just leaving OrderSelect(glbOrderTicket,SELECT_BY_TICKET, MODE_TRADES); instead of using
  Trailing Stop and reversing  (15   1 2)
Hy Guys! I have made a simple code, and then i have added trailing stop. Works nice, but i was thinking to reverse the order when sl is touched. My ideas is this: Trailing for (int b= OrdersTotal()-1; b>=0; b--) { if(OrderSelect(b,SELECT_BY_POS,MODE_TRADES)) if(OrderSymbol()==Symbol())
Hello forum, I am trying to get the Array Maximum value of an array. For this purpose, I copied the Bull Power Indicator. ArrayResize(HighestBullValueData, 15); for(int i=0; i<15; i++) { HighestBullValueData[i] = ExtBullsBuffer[i]; // PrintFormat("HighestBullValueData = %d, %f "
Does the function IsTesting() work in MT4 platform Build 509 ? When I use expression like the following, under tester there is no effect. Under TESTER, when I make back tests I have still Alert displayed "This is not testing !!!". Why ? if ( !IsTesting() ){Alert("This is not testing !!...
I am looking for an indicator that tells the exact rate of USDJPY on mt4 chart when GBPUSD had reversed. i.e. Gbpusd started rising from a certain point, at precise second /minute/hour time, i.e. 12 .53 minutes and 23 seconds it hit hit the low and then started rising. I need to find the price of
Hello, some objects disappear either when I change UT (does not appear on other UT and disappear from the U on which I initially created it) or when the platform goes out. the rectangles the trend lines. (of course I checked the visibility on all UT) oddly the horizontal lines remain visible on all
Hi all. I have created an EA to get any custom indicator's parameters in string type and pass it to iCustom function with StrToDouble(). I want to optimize indicator inputs using variables (INPUT_1,INPUT_2,INPUT_3). For example consider this indicator: NAME = Aroon INPUTS = 14,false,false BUFFERS =
hi every one I used below code for showing candle time, it shows candle time in 3 time frame like M1 00:12 M5 03:12
Hello guys, iam trying to learn coding of mql4. i just want to know how to add buy sell conditions in any simple indicator. so far i have realized that variables are in box int start() and variables are defined as double box_top=0; double box_bottom=0; so i need to add buy sell conditions like
hello, I'm looking for an indicator of the bollingers bands which mark the bands of different colors when the market goes up or down. This indicator exists in MT5. Here is the link: https://www.mql5.com/en/code/16489 I did not find it for MT4. Can you help me ? Thank you
Hi, I would like to ask for helping code for MA indicator. This code below is belong to an EA. But it seems not work well. Can anyone help advise me? Thank you. int Fast_Price = PRICE_CLOSE; int Fast_Mode = MODE_EMA; int Fast_Period=10;
Can we hope that this instance of an EA with a Martin will work without losing for several years? Can I trust this Expert Advisor with a large initial deposit? The tester optimizer was not used. The critical parameters were selected at random during several tester tests. I agree in advance with
hii friends, suppose i have a text file with some rabdom numbers only, only one number in each line.10 500 350 457 1385 57 3987 4532 something like above. I want to copy the second last number. In this case 7th number. Remember we don't know which numbers are there and how many numbers are there. I
I have created this function to update the TP/SL of market orders. In tester it sometimes shows error 1 whereas the TP and new price are the same values. if TakeProfit() and _precio are the same, I expect the function to skip OrderModify(). Most probably it is a stupid error from my side, but after
Hi all I'm back-testing an EA using Tickstory data, latest MT4 build and with M5 period in the tester. I use iRSI for 2 periods - M5 and H4. I save the values like this: rsiM5 = iRSI(Symbol(), PERIOD_M5, 14, PRICE_CLOSE, 0); rsiH4 = iRSI(Symbol(), PERIOD_H4 , 14, PRICE_CLOSE, 0); The thing is
  I need help :(  (4)
Hello, I have an EMas crossover EA, one of 5 periods and another of 100. when ema 5 crosses the long ema and is 500 points away from ema 100 an operation is opened. but if the price goes against the tp and crosses the ema in the opposite direction, another operation opens in the direction of the
Hello, Do you have any idea how the popularity of indicators are calculated in mql5 website. I see some indicators on top at popular indicators page all time
Hi all I've noticed some very peculiar behaviour with my MT4 trailing stops on a few positions. I’ve got a short position on EURAUD and it’s gotten to the profit level where training stops kick in. I have a 1600 point trail in my trade settings, but I just noticed there have been a number of times
How-to? If one buffer's value is from 0 to 100, it will fill the entire window, if another buffer's value is from 0 to 10, it will be 1/10th of the window. I need the both buffers scale independent from each other
I rented an indicator that looked promising . It required that an URL be added to the list under expert advisors in options. Every time I add the URL when I press OK it disappears . I talked to the maker and they couldn't figure it out . I talked to my broker they said uninstall and reinstall . I
hi every one I use below codes to show candle time in 3 time frame It shows time like M 0:25 M5 1:25 M15 12:25 but I want it shows time like M 00:25 M5