MQL4 and MetaTrader 4 - page 301

I'd like to write an EA that looks at heiken ashi candles instead of normal candles but am not sure how to do that (I'm still pretty new at this).  Do I just write a standard EA using the Open[], High[], Low[], Close[] commands and drop it on a chart showing heiken ashi candles?  Or is there some...
Hi i have a ea that when chart reach the some condition open and buy/sell trade i want to know it's possible when a user close open trade the ea ignore the condition and don't open a new trade( immediately ) and wait for next condition it's have any command and function to check if already opened
Hi there, I am new to this so would appreciate any help I can get. I have the following code to display the bid, ask and spread. It is displaying the bid correctly except for a couple of pairs (CAD/CHF and NZD/JPY). I've done troubleshooting and digits is 5 for CAD/CHF so I am not sure why the bid
Hi I want to learn about creating an EA that can open a position according to price action. Does anyone have an example or an article so I can learn it. thank you
Hello, Thanks to read my question: I got an array[x] x=196 // number of strings grabbed by: SymbolsTotal(0) I grab all name instrument and put them in that string array, for that it works well :) Now I need to get a drop down list to show all names to the guy who will set his instrument in the
Hi, I am new to MQL4 coding, and I have a question. I am coding an expert advisor which sends an Entry order at Golden Cross of Moving Average lines. I also want to close order when the Moving Average lines cross at Death Cross. However, when I backtest this EA, I can only send the orders and these
how can i convert a double value to a integer value?
Every time there is an update, about weekly most of my custom and market indicators no longer work and have to be reloaded
Hello All, I am new to MQL, Can anyone help me in converting following custom code to export advisor. It would help me lot. //+------------------------------------------------------------------+ //|Vortex Indicator.mq4 | //|From the January 2010 issue of
[Deleted]
In MetaEditor on EA source I start debugger via F5 In ClientTerminal a new chart is displayed. I need .tpl of my choice... Same idea as when use StrategyTester, I name the .tpl of choice with the .ex4's <fname>.tpl  I've done the renaming in all dirs having .tpl's but no joy. I've searched total...
i'm new and hung out somewhere. I would be glad if you help. If the close price is up to 20 higher than my active end position, I would like to reopen new position. How can I assign my last active position price to a variable? and "If the last candle closing price has increased at least 20 from my
Hi,I have to get the oscillator value of the previous bar (oscillator [1]), do I have to generate an array first? Can anyone tell me the syntax? Thanks for your help
  position size  (1)
hi can anyone help me find a good position size calculator for MT4 for forex i have purchased one th at didnt work and i am so disappointed
Hell everybody, here is my question: Is there a difference between terminal start (with a chart template which contains my indicator) and an indicator start (drag n drop from indicator list into the chart) ? The background is I made an indicator which should convert the price of a horizontal line in
So, I get this error in strategy tester mt4: Beside of the error, the strategy tester works really fine. But I'm afraid if I using this code in real account, this error would disrupt the trading. Can someone help me to fix this? This is the code I write: extern int Magic1 = 100 ; extern int
I have a problem. When i started to write my EA i found a serious problem: all indicators were working right less iCCI I tested macd, rsi, stoch, .... and i did over m1, m5, m15, m30,... i was checking real values and BT and all them works perfectly, but cci no. On pic i show a example. Bottom is BT
Hello, traders! This is my first forum post on this forum but I really need this one. I'm having pretty peculiar trouble with the function MathAbs int MQL4. It returns a NEGATIVE number. I have two edits of the particular line and it still returns negative. Here it is. The original one: LotSize =...
  1 Errors Message  (7)
Example I want total sum for loop show 1,2,3,4 total = 1+2+3+4 = 10 It show error int p= 1 ; int z= 3 ; int t= 0 ; for (p; p<=z; p++) { Print (p); t=p+p Print (t); } 'Print' - some operator expected squarecomment.mq4 123 4
I have a suggestion to add Horizontal Array Line in MT4 as drawing tool similar to drawing tools on Tradingview chart. I don't always want to use horizontal line
#property copyright "Copyright 2016, MetaQuotes Software Corp."#property version   "1.00"#property strict#property show_inputsenum Operation{   buy=OP_BUY,    //BUY   sell=OP_SELL,   //SELL};extern double Lots=1;           //Specify position size, this is ignored if you use the Risk %extern double...
I recently downloaded the OANDA_Orderbook2.ex4 Expert Advisor program in MT4, but it immediately shuts the application down when I enable the "Allow import DLLs" setting (for the required v20-fxlabs.dll file). I read through the installation instructions provided in OANDA's guide, and did everything
Please refer to the screenshot below. The profit is printed with OrderProfit()  once detecting OrderClose(...) returns "true". There's no problem with back testing. During the live test, you can see OrderProfit() of a closed order was printed in the experts log as "1.40".  However, the accurate...
Hi all, I have a code to calculate a lot size. This code should calculate how much lot size I will buy or sell depending on the max risk percentage that I put. this is the code to calculate lot size. double OptimalLotSize( double maxRiskPrc, int maxLossInPips){ double accEquity = AccountEquity();
Hi all, Is there any way to partially modify an order? Specifically, I place orders with attached S/L and T/P but after some time and as new calculations are been made in the EA I want to modify only the S/L and keep the initial T/P as is. Calculations of levels and modification of orders are took
I have no idea string that warning I try TimeToStr or String or Int..... not working string period = ( Period ()); int ip= 0 ; switch (ip) { case PERIOD_M1 : period="M1" ; break ; case PERIOD_M5 : period="M5" ; break ; case PERIOD_M15 : period="M15" ; break ; case
[Deleted]
Hi, All my charts are not updated, they still stay at the data of Aug 13. Can anyone tell me how to update the charting of my MetaTrader 4? Thanks in advance. helen
Hi. I'm working on a EA where we start to see if it's possible to have more then one order triggered if the same trigger happens before we change trend. The code was first made to only do one order at a time with this: total = OrdersTotal (); //This is regular program buy or sell signal if
  Please help me!  (4)
I have a problem with this expert.The tests showed a very good performance.In visual mode works perfectly.The problem is that when I put on the charts constantly opens and closes trades.I would be very grateful if anyone can fix this problem
hello im testing a EA that has timeframe configs , once i got very good results backtesting but when i checked my settings the strategy testers 's TF settings was set to H4 but my EA's config was trading on m30 TF! so im wondering what happens exactly in this situation? if i set TF on both side on
Hi, I am running an exercise to close a position 20 candles after a MA Crossover . The code is made of 3 blocks, the 1st to open the trade, the 2nd to count the bars since the last MA crossover, and the 3rd to close the position. This code doesn't work and the position is closed immediately