MQL4 and MetaTrader 4 - page 495

To post a new topic, please log in or register
  Alert Signal (1)
Hello, I'm looking for an Alert Indicator that Signals (alert.wav) "Only" when the bid is above the entered price and the bid crosses the entered price. The reverse test is when the current ask is below the entered price and the ask crosses the entered price. Is there one like that available now?...
  zero divide (3)
Hi, Not sure how to deal with math about ordersend lots, lotstep, minlot.... So I tried some, and suddenly an "zero divide" occured. By adding some debug "print", I'm sure it's because the math I just mentioned. .....  Print(ratio);  Print("here   4");double pudanlot = MathFloor(...
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.
  pip or point (6)
Hi, a quick question please: OrderClose(OrderTicket(),OrderLots(),Bid, 3,White);   Not sure it's pip or point here. Do I need to rewrite it as: int mypoint;if(Digits==3||Digits==5) mypoint=10; else mypoint=1;OrderClose(OrderTicket(),OrderLots(),Bid, 3*mypoint ,White);  
i have write a EA small code get ordersend error 130 please tell me whta is the wrong with this int BuyOrder1 = OrderSend(Symbol(),OP_BUY,0.01,NormalizeDouble(Ask,2),5,NormalizeDouble(Ask,2)-8*Point,NormalizeDouble(Ask,2)+ 18*Point,"Asanka Buy",16384,0,Green); Alert(GetLastError());
Dear All, Kindly help me configuring the following issues: 1) The function, AccountLeverage(); It return the account leverage as per MQL docs; but, I've notice that, brokers would offer (say 1:200) for currencies while (say 1:100) for metals and so on; which means that, somehow it differs from...
Hi, SciTE is much better than Metaeditor. Everybody may want to try this: https://code.google.com/p/scite-mql/ I can create in SciTE a code including Chinese words and save, and open this code file. Also I can copy&paste into Metaeditor and then save as .mq4 file. But drag this mq4 file from...
Hello what im trying to do is simply make a traders assistant ea when its reading open orders its supposed to print the order it found but its not showing anything but a 0 or "" (blank) Could somebody fix my code? #property copyright "Copyright 2013, TradersAssistant -by Brian Lillard."#property...
Hello I am new in this system, I try MT4 a few weeks and I found this forum. I would ask for all, if anyone did think about combination stochastic indinactor with moving average. I can´t program it, so I look for help and write here this idea. I would to know if it is possible in expert advicer. PS:...
New article MetaTrader AppStore Results for Q3 2013 has been published: Another quarter of the year has passed and we have decided to sum up its results for MetaTrader AppStore - the largest store of trading robots and technical indicators for MetaTrader platforms. First of all, AppStore for...
Hi, I have this idea: Doing code for automatic open news graph (rotate system). Example: I select few prefered graph (majors) and I want rotate this graph after X sec. Do you have code for my idea, please? Thank you.
  trade only one time a day (14   1 2)
I have written a breakthrough EA,after a month test,I found that sometimes it loses several times within a day. Therefore,I want to revise my EA,to make it trade only one time a day.Could anyone show me how to realize that?Thanks
I couldn't drag & drop or copy & paste the RSI onto the chart. The only way I can get the indicators on the chart is to double click but when I do this the RSI will only go on the bottom of Value Charts. Example: https://www.mql5.com/en/charts/ 807904/eurusd-m5-oanda- division1 I would like the...
Hi, I have a signal if price cross a level. before entering... I would check if market can sustain this level for 10 sec at least. //-------- if( lastTradeTime != Time[THIS_BAR] ){       lastTradeTime = Time[THIS_BAR];       datetime Duration = 0;} if (Duration == 0) { if ( Bid > highValue || Bid...
Hi! Anyone could help and and tell me how to make the 1 Minute (M1) data show inside History Center? I follow a video tutorial online to delete all the default M1 data and click 'Download' to get all data so I could do a proper backtest. But after i delete everything on M1 and download the data, the...
So I have found the issue of what is causing zero divide - I have not seen this before until now. I thought I was finished with my code until this popped up! I have 3 variations of my EA. 1 works flawlessly, the other two are similar in this department (code below). I cannot understand why this...
Hi, I’m trying to understand how Headging could work. I want to make it clear that I don’t mean to arbitrage, since I’m aware of every problem that makes it impraticable. I just want to understand where my logical mistake is on sizing the lots for an almost ‘perfect’ hedged position. I consider...
I made a simple free expert for a local trader community. However some users keep reporting unwanted position closings. The code is simple and after various re-checking (and checking user behaviour and settings) I ha heve no idea why could it do the closings. The expert watches Supertrend indicator....
extern double longGridCenter = 0;      // defines the center point of a fixed width long grid                                       extern double shortGridCenter = 0;     // defines the center point of a fixed width short grid                                       extern double longGridLow =...
  DLL Error 127 (13   1 2)
I am receiving the following error message Cannot call function "xxx" from DLL " xxx" (error 127) This is a commercial indicator (not EA). I have run the indicator successfully on 2 of my computers with WinXP. A third WinXP computer gives me this error message. The DLL file is in the experts/library...
I was wondering if someone could answer a few questions regarding swaps : 1. I Know I can use MarketInfo(“EURUSD”,MODE_SWAPLONG) in a demo platform and I get a value returned, but is this swap value the same as would be used in the live platform ? 2. How often do the swap rates change ? a...
Hi. I need some help with this code. When I push play, the EA opens SELLIMIT orders and BUYLIMIT orders, that's ok. When the price goes up and reaches SELLLIMIT order #1, the order is triggered, and becomes a SELL position, that's ok. The problem is when the price return (goes down), below the...
Hi, I wonder is any solution to read News from "News" Tab in metatrader by script or indicator? Regards,
if (OrderSelect(0,SELECT_BY_POS, MODE_TRADES) == false && OrdersTotal() == 1){  Print ("failed Order Select");   }if(OrderType()==OP_BUY && M < S){  OrderClose (OrderTicket(),Lots,Bid,2,Blue);  }else if(OrderType()==OP_SELL && M > S){  OrderClose (OrderTicket(),Lots,Bid,2,Blue);  } I am not getting...
Do you know where to find the indicator of spread? Like a MACD indicator, moving line showing the spread at the specific time?
I want to insert the price value on top right corner of this horizontal line. How can I do this? // Plot horizontal lines..........    if (StringFind(prop,"H",0) >= 0)  {      if (!CandlesMustExist  ||  (exist1 >= 0 && exist3 >= 0))   {        objname =...
Suppose I want to output the current Bid/Ask price to a CSV file. Whenever the price changes, I want the file to update. I was thinking something along the lines of this might work. double PreviousAsk;//+------------------------------------------------------------------+int init()  {    int...
I downloaded an indicator FX Divergence and the alert comes up as Classical or Reverse Bullish/Bearish Divergence. What's the difference and meaning. Thanks
how can i set %R and RSI in one window? please help
I am using StringConcatenate converted to a datetime variable for open and close times as a filter for when trades can be opened. Does it work in strategy tester ? I also am using a cycle to check profitable orders in Account History, Does this work in Strategy tester ? I haven't been able to get...