MQL4 and MetaTrader 4 - page 1679

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);...
[Deleted]
Any function returned array of symbols available?
[Deleted]
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 &&...
  Contest folder  (7)
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...
[Deleted]
hello folks. i just get started learning the powerful MQL4 and try to write some simple program. I want the MT4 to remind me that the last candle line was a small one 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;
[Deleted]
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...
[Deleted]
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!
  History restore  (3)
Ok, i have downloaded the 2 years history of EURUSD1 (1 minute) and wanna restore from 1 minute the 5min, 15min, 30 min, 1H and 4H. I have a look at period_converter but its a lot confusing. How can generate a EURUSD5, EURUSD15, EURUSD30, EURUSD60, EURUSD240 files so i can 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 concept of 'instances' Each time indicator (ind) is applied to chart a differently colored moving average line 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...
[Deleted]
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...
[Deleted]
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...
  LOGS TESTER FILE  (2)
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
[Deleted]
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 we
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, but
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...
I have a function that closes all the trades opened in a buy or sell position, hereit is: http://rafb.net/paste/results/jhCL1M85.html When running testing i got thinks really weird like you can see in log line 39and 40 when the position have his OrderSymbol() equals "", then whenforced to close,...
I have a function that tries to filter orders that is already placed in a givenprice. That's the code: http://rafb.net/paste/results/LkIdWE39.html and That's the log using the Tester: http://rafb.net/paste/results/kmOPLb73.html I can't figure out why in log line 93 its returning the comparision...
[Deleted]
I am learning programming in MT4. How can I calculate my indicator only after the lastest bar has been shown on the chart and how can I update the indicator at least after 5 seconds or at the beginning of a new bar is generated thereafter? Any help is greatly appreciated. BTW, my indicator is a
  Deriving a conclusion?  (20   1 2)
So it has been almost a full 3 months now since testing began on January 8. And here are the results as posted on the total leaders thread. Total winners from the beginning of the testing: EURUSD: 1. - Scalp_net with 472 pips. - GoldWarrior02b with 445 pips. 2. Envelope 2.11 with 304 pips. 3. -...
First of all, this is not my indicator - it is from another board but I have spent literally hours and days carefully backtesting by hand on a TF15. You may have seen the thread "Today Trend". Basically the indicator looks back at the previous day's highs, lows etc much like a pivot and then uses a...
[Deleted]
i need to write some code that will close an order of the current close is x pointsless than the current high. or vice versa i tried if (close[0] + spike *point)< high[0]) where spike is an externaldouble variable. similar to a stoploss variable.
[Deleted]
Can you store the price in just a variable? So maybe at the end of the EA add aline of code like: int Previous_Price; Previous_Price= Ask; Can you store that for the next tick as the EA re-initializes? or does it get wipedout no matter what? Do I need to use an Array even if I ONLY need the...
[Deleted]
Hello, I have only the below code in the start() function of EA, but the problem is thatthe code always throws the error message - "Error". Could somebody giveme any advice? How can I open pending order ? Thank you. int Ticket=OrderSend(Symbol(),OP_BUYSTOP,0.1,1.2175,0,0,0,"macd sample",16384,0...
Hi folks, Scenario 1: The EURUSD went up, I want to tell the boss. What if the MetaTrader can open my email client! Scenario 1: The EURUSD went down. Could MetaTrader open the notepad to write a piece of note. If you are a lazy person like me, or you have more useful ideas (scenarios) about...