Download MetaTrader 5

MQL4 and MetaTrader 4 - page 1269

To post a new topic, please log in or register
Hello !! I have a Expert Advisors based on a indicator. I would like reset my indicator at close for each bar of the current chart becausei modify the three last bar of my indicator and i need to reset (redraw) my indicator. thank you Bedaine
I am writting a custom indicator using iBarShift to select the bars to anylize.When I use the following code to implement the iBarShift() funtion it returns 4999no matter what datetime I use. The only change that i have made to the chart is under Tools-Options->MaxBars on chart was change from the...
I know C/C++ and find the syntax of MQL4 to be compatible with C, However thereare annoying differences such as not being able to do a pre decrement operator(--pos), etc. How do you pass arguments to functions that modify the arguments. In C you canuse pointers and in C++ you can additionally use a...
  Contest (222   1 2 3 4 5 ... 22 23)
Hi Newdigital, when can we see the situation of EAs? For me (but I think for everybody) may be a useful idea to make a real-time statement of EAs like, for example, Profit Generator. https://www.mql5.com/en/forum/173795 So we can follow and study the performance every 15 minutes. bye felix
Is there a way to create (unless one already exists) a script that can be run to close all open trades of all currencies? When one is testing an EA over multiple pairs (the ability to open trades), one needs to "reset" so that there aren't open trades. Is there a way to create a script that can do...
In functions that reference the bar, just what is used on [0]? For example, what is Close[0]? I would expect it is the current price (bid?).However, my EA isn't behaving that way, so maybe it's something else? Another example, the MA function iMA(.....,0) where that '0' refers to the current bar...
Does mql has any support for composite types like c struct, pascal record, or evena class ?
Is there a way to enable drawing during Test, like it is done in RealTime, showingbuy, sell and other signals ?
I have written some code that calculates the data each time start is called. I haveincluded TestAgVol.mq4 as a test case. I use the volume data in my calculations.I have noticed that you always get 2 ticks minimum, Open and Close. These comein at Second() = 0 and Second() = 59. During high volume...
I would like to implement a library function that can modify a given value passedas parameter. This is a Test Case for what i am looking for: void modify_double(double value){ value = value + 1;} int start(){ static double mydouble; mydouble = 1; Print("Mydouble: ",mydouble);...
Any function returned array of symbols available?
int CancelTime=StrToTime(cancelOrder_HR + ":" + cancelOrder_Min ); int EndTime=StrToTime(End_HR +":" + End_Min); int ScriptDurationInSec = ((Close_Pending_After_X_Hr*60 + Close_Pending_After_X_Min)*60); //---between open and close timeif(CurTime()>=EndTime && CurTime()<= CancelTime &&...
Hi I did try to post a message in the contest folder but it just say: smeden, you do not have permission to access this page. This could be due to one of several reasons: 1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access...
hello folks. i just get started learning the powerful MQL4 and try to write somesimple program. I want the MT4 to remind me that the last candle line was a smallone which has short true range and i want it to remind me for 5 times by a sound.So i wrote the following lines. extern double v=0.05;...
i tried coding with ibarshift using a 1 min chart, and ima of a 1 hour chart. seemsnot to be working, TimePassedFromBegin=iBarShift("GBPUSD",PERIOD_M1,EndTime, true); SessionHigh =High[Highest("GBPUSD",PERIOD_M1,MODE_HIGH,ReferenceStart-TimePassedFromBegin,TimePassedFromBegin)]; int...
trying to get the highest price from 9 to 10 am, but the highest only does calculationsbased on the current candle. any way around this? or is there another function i can use to call the highestprice for a specified time? thank you!
Ok, i have downloaded the 2 years history of EURUSD1 (1 minute) and wanna restorefrom 1 minute the 5min, 15min, 30 min, 1H and 4H. I have a look at period_converterbut its a lot confusing. How can generate a EURUSD5, EURUSD15, EURUSD30, EURUSD60, EURUSD240 files so ican import using the History...
How to do that?
  "if sentence" (1)
Immediately after the following conditioners (if....) one prints the variables: It´s stranger what MacdCurrent= to SignalCurrent(-0.0005) and MaCurrent = to MaPrevious (1.3109). Please, Who can explain it? At the end I reproduce the records of the Log. if (MacdCurrent < 0 && MacdPrevious <...
Hello all you code dudes! My aim is to learn how to use one .ex4 many times on main chart by using conceptof 'instances' Each time indicator (ind) is applied to chart a differently colored moving averageline is plotted, showing that instance(n) has run... (brief pseudo code) init()if global var...
Hello guys, I've tried this way: double acFree = AccountFreeMargin(); int acLev = AccountLeverage(); double maxVol = ((acFree*acLev)/Ask)/10000; int ticket=OrderSend(Symbol(),OP_BUY,maxVol,Ask,3,0,0,"expert comment",255,0,CLR_NONE); but never whole margin is used - always 3-8% of...
hi, it is my first post / question on the forum. so far I have used only VT platform for programming auto-trading systems, but ithas too many limitations. Now I have been trying to create some EAs and custom indicators under MQL4. itlooks simmilar to old good C, so I really like it. As I learnt...
Hi all, I´m starting to use mql4, and I´m having some odd results in a little program I wrote that logs theclosing price of all bars. However it takes a time period from Jan 31st 2005 to Feb 2 2005. Dan somebody tellme why the CurTime() function returns me such date? I appretiate any help in this...
How I can clear the tester logs file. I have tested enough and this file has toomany records that obstruct the analysis of the test I Will be very thanked for by your collaboration
Hi All, this is my first post here, pleasure to meet you! I'm not a programmer of any sort and I don't write MQL4 code. I'm here becauseI would like to offer a project for an experienced MQL4 coder. I would like to build an auto-trading Expert Adviser and I know exactly what Iwant. I know all the...
dear friends We want to encapsulate the automatic trading strategy into an indicators for visualization and manual execution. so we can use it manually as much as we use it automatically some time the EA is not accurate plus many of us want to see the indicators work and then act what i am saying...
When I execute my EA I get the following message "2006.03.30 08:30:16 ea EURUSD,M30: ticket for OrderModify function must be an integer" but my order modify code is OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop,OrderTakeProfit(),0,Red); So I'm guessing OrderTicket() is not...
  Multi-lot scalper EA (46   1 2 3 4 5)
Hi ppl, i have made so many tests on this EA and the backtest are so great.. the problem is when i put the Ea working on live demo the loss came more fast than profit. I don't know why this happen. Can someone made some adjustment on this EA to work better... i thinking this is a very good EA,...
Hi, Attached is the legendary Hans123 EA modified by Milan. Below are the changes to the settings that I make and it regually earns me 100-200 pips per week. 2 mods would make it even better. Firstly, I usually don't trade it on Mondays, purley because there is never any news out on Monday and since...