Download MetaTrader 5

MQL4 and MetaTrader 4 - page 495

To post a new topic, please log in or register
I wanted to code something that, at the start of the current timeframe candle, the EA will check say, the trend. Then later on, at every tick it will check something else.  I tried to use the below format   int start(){                   if (Time0 == Time[0]) return(0);                    Time0 =...
Hi all, I manually opened a sell order on USDCAD, size 0.10, order ticket 162078588. I wrote a simple expert that I attached on the USDCAD graph. int start()   {     OrderClose(162078588,OrderLots(),Ask,NULL,PaleGoldenrod) ;                   } The expert does not close the order. In the Journal tab...
The code is as below: if(Close[0]>=1.3096) OrderSend(Symbol(),OP_BUYSTOP,2,Bid,3,Bid-7*Point,0,0,0,0,Red); if(Close[0]<=1.3089) OrderSend(Symbol(),OP_SELLSTOP,0.5,Ask,3,Ask-5*Point,Ask+2*Point,0,0,0,Green);   I want made EA which will send new order to  buy "2" lots when the price reaches 1...
Hi  I wanted to know if anyone has ever seen the above error. I have been seeing it for the past 3 days on MT4 build 479 but the broker offering MT4 (MBtrading) said to try here first as they dont help with MT4 issues. I was only able to get a picture with my phone because each time when i click MT4...
Its code is very simple and is below: if(OrdersTotal()==0)   {   Print(OrderSend(Symbol(),OP_BUY,0.5,Ask,3,Bid-7*Point,Ask+20*Point,"OP_BUY",0,0,Red));   Print(GetLastError());   }  the code means send order one time .  I have attached it on the chart some time and then i removed it. but i find it...
Hi guys, i have an larger Customindicator with more than 20 Variables. And now i want my EA to get Access to the value of this custom indicator by using Value = iCustom(NULL,0,"Trendrichtung",true,true,true,true,true,true,true,5,20,5,2,10,20,50,5,2.0,0.5,0.5,2.0,1.0,2.0,0,0); Is there an easier way...
Hi guys, i wrote this code in an indicator to show the value of the array and an moving average on this but the chart does only show the array not the MA. What is wrong with that? #property indicator_buffers 2       // Number of buffers#property indicator_color1 Blue     // Color of the 1st...
1. I get the arrayX by the function--ArrayCopyRates();    and then execute functions of  "ArrayGetAsSeries(arrayX)" and "ArrayIsSeries(arrayX)" as order.    but the return of the former is 1 and that of latter is 0. why? 2.  how can get the maximum or minimum open price for the arrayX? 3. how can i...
Can someone help me to prevent a trade that has closed from re-opening in the same direction? I have seen code that allows only one trade per bar but I just need it to stop trading in the same direction. This is the code I have but it stops all repeat trades    //if order closed on a bar prevent...
My broker has sent me a link to their new MT4 application download. How can I transfer my personal custom settings from my previous install to the new one, like my adjusted indicators, profiles and templates so I don't have to redo all that again? Thanks
Hi All, I came across this Fisher indicator recently, however it does not work like a typical indicator. When I add it to a chart, it looks different as from the backtest. Any idea how to get them to line up properly and how to call this indicator properly in iCustom? The funny thing about this...
Hi, anybody here with a hint or - even better - a solution? I start via TickDataSuite the terminal.exe. It normally starts and and logs in. But if I start a visual back-test  all crashes with this Windows-message: Problem signature:   Problem Event Name:    BEX   Application Name:    terminal.exe...
Dear all   I wrote an indicator to look for following condition:   If price is within ibands(deviation 1, upper) and ibands(deviation 1, lower)  for 2 timeframes, give me a "1" result.   However, it doesn't work when I put it on GBPUSD H1 chart.  Can anybody tell me how to fix it?   Thanks a lot!...
  last order profit (12   1 2)
Hi all,   Say that I have more than one order open and I just want to get the profit, commission or any other information regarding the state of the last  order. Is the following code the right way to get it ? void OrderGetProfit()          {        Profit = 0;               for(int...
Is it possible to specify the start and end time of the bars shown in the chart? and how? waiing online for the answer. thanks. 
Nowhere in my EA code I ask for a Symbol name. But see the output. How is it possible?
Hi, can i attach 8 different EA of different strategies to a single account trading the same currency pair  what can be problems in doing so?     
Hi All, I have been spread betting FX manually for the last 3 years. I have decided I want to automate some of my manual systems so I decided to learn MQL4.    I am learning MQL4 from the MQL book on this site. I find the book excellent. I am studying the chapter on "Opening and Placing Orders"...
I need a Drag and Drop Stop Loss and a Drag and Drop Take profit indicator. The one I have that works for one of my brokers doesn't work for another. Any suggestions would be very helpful?
i'm currently having problem on logging in to mobile metatrader 4 on all my devices after password changed. seriously need help. urgent! thank you.
Hello, I'm finding wrong data when I export live information to an Excel lookalike: Here you can see the formules in cells: And these are the displayed results: USDJPY data is correct and the "Full" and "Time" columns too, but the bid, ask, high and low data is wrong (except in USDJPY) Any clue?...
Hi all, I have a one-line CSV file with 6 integer values in it.  I am trying to read it and write it to a two-dimensional array, but I can't get my code to compile.  Please help! Code:        int handle;       handle=FileOpen("Strat10.csv", FILE_CSV|FILE_READ,';');       if(handle>0)       {...
hello, i want to creating vertical lines when my EA go long or short. What code i must put it to my ea? thanks
I have opened a mutlichart window of 8 forex pairs. The Support and Resistance lines I have place disappear when I switch to another chart.  Is there some about multichart windows that cause this to happen.  I would appreciate anuy thoughts on how I may overcome this problem. Regards to fellows...
i have a job for a programmer i need a Ea Expert adv  robot for mt4 and ill pay good is simple i think please email me at private message - subject   MT4 INDICATOR  and i send the details please make sure you are a programer  not a newbie  
Can anyone tell me whether it's possible to have MQL4 calculate a moving average of an indicator such as the RSI?  It can be done in MT4 but I don't know whether it can be programmed in MQL4.  Thanks in advance.
Hi there. I guess the subject explains my question. Are there some way to change at the same time, with one click, the Zoom or the Timeframes of all open charts in MT4? Some script or tool... I am talking about to change all the open charts, for example from 1 hour to 15 minutes or other timeframe,...
1. Can I increase font size on chart? 2. Can I set times to my local time zone? 3. Is there a way to see past bars open, high, low, close without having to put the cursor directly on that bar's close? Can I make a data box or something that gives me the ohlc info w/o needing to strain my eyes and...
I have an EA that opens orders based on trendlines I can drag around the chart. I'd like to quickly reset this EA by applying it to a new chart leaving the lines in place. I've writen a simple script to delete certain components, leaving the lines. However, the dupliate MagicNumber (extern...
Hi guys, i tried to get the value of a custom indicator but it failed. I attached the indicator but sometimes it doesn't deliver any values. double Value = iCustom(NULL,0,"HMA_v07",Cross_Fast_Period,0,0);
1...488489490491492493494495496497498499500501502...1250