MQL4 and MetaTrader 4 - page 1155

  Cool system!  (474   1 2 3 4 5 ... 47 48)
This is amazing!!! Out of 10 trades 8 are profitable. Can you tell me how to insert the data of these indices into the EA
[Deleted]
extern double RiskMM=0.02;...... int init(){ ...... double InitialBalance=AccountBalance();} int start(){double CurrentRisk = InitialBalance- AccountEquity();          CurrentRisk=CurrentRisk/InitialBalance;         if(CurrentRisk>=Risk) {.....CloseAll(); return(-1); } ............return(0); }
MetaQuotes Software Corp. announces placing a downloadable version of Sergey Kovalyov’s book Programming in Algorithmic Language MQL4 on the website of MQL4.community. The book is published in the Windows Help File (CHM) format, and it can be downloaded to be studied offline. As its title suggests,...
Hi I need some help, please. I'm trying do write a script reading an input file creating an otput one. My problem is: 1) I have a WHILE loop to read the input file 2) FOR each record it must do some processing a write an output 3) When the FOR is not in the script ALL the commands are executed 4)...
[Deleted]
Hi, I am now studying this EA provided in CodeBase, https://www.mql5.com/en/code/10306 but unfortunately, I can not find these three header files: #include <BasicH.mqh> #include <OrderLibE.mqh> #include <OrderLibH.mqh> can anyone tell me where comes from these header files? are they provided by...
Hi guys, I got a recommendation for a 'Strategy Trader' trading platform. Did anyone try that 'Strategy Trader'? Does it has any superiority's over MT4? Thanks, James
hello! my ea open pending order and modify open price pending order(just open price pending order).i need a code when my ea have signal(for example when ma have signal). stop modify pending order and dont modify until open new pending order. please help me i realy need it. thnx.
I am busy creating my first EA and had the following results: Total net profit 169356.07 Gross profit 735527.38 Gross loss -566171.31 Profit factor 1.30 Expected payoff 1459.97 How is the "Expected Payoff" calculated? Which is more important: The Profit Factor or the Expected Payoff
Is there a simple way of retrieving if a previously closed order closed via Take Profit or Stop Loss? At present I am retrieving price data and comparing closing price with stop loss and take profit to infer if that was the case. thanks
[Deleted]
Helllo everyone I use MT4 but i can`t draw Fibo Arcs. I don`t know where must be my 2 points? ie.one low and one high? I don`t know what must be my scale and what`s our criteria in determining the scale
[Deleted]
I'd like to confirm my trade lot, and use code as follow: double LotsOptimized()  {   double lot;//=Lots;   int    orders=HistoryTotal();     // history orders total   int    losses=0,wins=0;     int    b,c;   b=iATR(NULL,0,233,0);    c=AccountLeverage();               // number of losses orders...
We have a large EA that has worked fine for the past year without concern for build versions of MT4. As of build 399, an EX4 compiled in 399 crashes the terminal when run in 229, but a recompile of the identical source under 229 works fine. Are there known issues involved here? This could become...
[Deleted]
please can any one know to integrate mql4 Language with vb.net
Hi there, I am trying to open a csv file and add some information to the end of it. I use for example: string filename="test.csv"; int Handle=FileOpen(filename,FILE_CSV|FILE_WRITE,';'); to open a csv file and: string date=TimeToStr(TimeLocal(),TIME_DATE); string time=TimeToStr(TimeLocal()...
  ea issue  (6)
I've programmed an ea which should do ok on EUR/USD ( backtested from 2000 - 2010 ) http://img851.imageshack.us/img851/6564/12314.jpg but failes on all other pairs should I throw it away ?
Hi Guys, I created an EA but TrailStop() function cannbe be executed in the main fuction. I checked several times but couldn't find out the bug. Could you help me debug it? Thanks... My thread is simple. No profit target set when sending out an order and trigger TrailStop() when getting 40 pips...
"Don't try to anticipate the market, follow the price!" When you read that, it makes you feel like a sheep. It is so easy to follow the price and take profits, while you make some predictions and suffer losses. Can someone explain this principle? I've always assumed that opening a position is based
Dear all i have a problem in stop loss its not working, i need help in correcting it thanks in advanced OrderSend(Symbol(),OP_BUYSTOP,Lots,Ask+Step*Point,3,Ask+(Step-SL)*Point,Ask+(Step+TP)*Point,"",12321,0,Green);  OrderSend(Symbol(),OP_SELLSTOP,Lots,Bid-Step*Point,3,Bid-(Step+SL)*Point...
[Deleted]
Hi, maybe it is basic knowledge but why is it that the MetaTrader backtester overrides the timeframesettings I assigned to my variables? For example: I want the EA to buy after an engulfing candle pattern has formed on a 5 min chart, so I declare the variables for iClose and iOpen and set them to...
I want to check with Heiken Ashi to see if their trend is in the direction of my order... as an added confirmation. How do I check them from my ea code? For instance... if my ea says to buy a currency pair, I want to check the Heiken Ashi indicator to see if there is an up trend on say the 15 min...
[Deleted]
I have other exit criteria and i don't want it to get messed up.. I just want to add a stoploss to an order but OrderModify() wants a takeprofit value.
Hello, I have a huge issue with backtesting. I have coded my own EA, backtested it from year 2010 till today and the results was awesome, about 300% gain(the backtest was made at least 20 times, because I try to optimize EA). It was on main PC, but I when I was at work, I backtested it again and...
  pls  (1)
pls i need to no how to buid my own trategies,
Hello, I have a simple TimeBased EA, It does work fine with the demo account with Alpari but not in live accound with Oanda Without any errors in the Experts section Noticethat the: - Enable expert Advisors(except for Custom Indicators and Scripts) -Allow live trading -Allow external experts imports...
On: https://docs.mql4.com/account/AccountFreeMarginMode 2 - only profit value is used for calculation, the current loss on open positions is not considered;3 - only loss value is used for calculation, the current loss on open positions is not considered. The second line should say "the current...
[Deleted]
Hi, I need an EA to check for a script on the chart and cannot find a function to do this, WindowFind() only works for indicators, is there a way to check for a script? Thank You!
[Deleted]
Hi! I have an Expert Advisor with many variables, all of which can work on a range. The thing is, I would like to know if there is a way to run tests automatically in the Tester, each run with a different value for the variable (say, run test with some x = 1, then with x = 2, etc), because up...
[Deleted]
Hi guys, In the docs it says: "Note: At the testing, local time is modelled and is the same as the modelled last known server time." just to be sure. In real time, on Fridays, when the server stop streaming data, Print(TimeHour(TimeLocal()) will be printing the local computer time. Right? Thanks,...
[Deleted]
any indicator can detect ranging market ?
I apologize for my English. Hi I have a problem and do not know how to fix it, I hope someone can give me a solution. I have the EA USUALEXPERT.MQ4 that is in the metatrader programming book, but in this EA I can only open an operation to buy or sell at a time. The strategy is sigiente while the...