Download MetaTrader 5

MQL4 and MetaTrader 4 - page 232

To post a new topic, please log in or register
Is this the right way t do ichimoku alerts in MQL4? The alerts are at the bottom. I haven't figure dout a way of swapping over the senkou span/kumo cloud alerts yet apart from the alert every time the Bid price crosses. Complete code in the attached notepad file. //----ALERTS//---- TS cross KSif...
Hi, Can you guys help me to make this candlestick pattern?   it's different than usual pattern. Can you guys please help me, how to code this?    regards 
Hello, In my EA I'm trying to catch the moment when the custom indicator changes its color, would you guys help ? Thank you! Source of the indicator below //--#include <MovingAverages.mqh>//-#property indicator_chart_window//-#property indicator_buffers 6#property indicator_color1 clrNONE#property...
Hello, Hopefully someone will be able to help with my query, I have a base class, and 8 inherited child classes, is it possible to create an array of type "base" to store each child object for easy looping, or would there be a better approach to this? The cCurrency class is responsible for...
  iMACD (4)
Hi everyone; double  iMACD(    string       symbol,           // symbol    int          timeframe,        // timeframe    int          fast_ema_period,  // Fast EMA period    int          slow_ema_period,  // Slow EMA period    int          signal_period,    // Signal line period...
Hello to all. I have been trying to search around here and on mql5.com for what exactly this ERR_ORDER_LOCKED is all about.. there are multiple places to find that 139 means Order is locked but no explanation as to what this means.. is this something the platform is doing or something the server is...
I want my EAs to ankwoledge the news in market, I will like to use this information in 2 ways. 1.- To analizye the news impact on my strategies, using backtesting, data analisys, etc... 2.- To make use of the time of next releases, to perform actions on my EAs. I know that for example forexfactory...
It seems possibly that integration with Visual Studio is quite good. Can someone help out and tell me how integrated backtesting and Visual Studio can be? Perhaps a different IDE is possible too???? Are you getting all watch windows working, can you "edit and continue", are breakpoints working, are...
  MACD / MACD-2 (12   1 2)
This goes to anyone that can help me ! I am new to MT4, and consequently not familiar with its operation system regarding downloading external indicators. Anyway, I am using an APPLE Imac computer where I downloaded the MT4 using a PlayOnMac / Wine. No problems up to here and neither to set up my...
Hi, I want to know what is current broker time in weekend because I want to determine GMT offset. In mql5 is a function call TimeTradeServer() but in MT4 are not. How can I know what is the broker time in weekend ?  
Guys, hi. On FF and on other forums, there are not-willing-to-help-if-you-are-not-paying people , I hope that one of you can help me with that, it's really easy. Here is my EA, which works good, but few more options are needed to make it complete. 1. Close and deactivate EA when Profit gain will...
  I need a code (1)
Hi I have problem at writing a code for close positions I need a code that  if price was higher than the open buy position to close position(for buy mode) And If the price was less than open sell position to close position(for sell mode) please help me thanks bool BuyMode;bool SellMode;double...
I have a MS Surface Pro 3 tablet that I loaded MT4 on. Can log into my account and it runs fine. I copied some custom indicators from my PC to the tablet and placed in the proper indicator folder. I even compiled them again with no errors. But when I place them on a chart and click OK, nothing...
Hello! I would need some help in the making of an EA. How can I eg. export the bid/ask prices of two brokers (using global variables, excel or something) on order to compare them and send a signal to the EA to initiate a trade. I can write most of the script i think but i have not done anything like...
Hello Guys, I am getting error 138 (requote) only in backtesting it looks to be fine in demo acount. any clue? here is my code: #include <stdlib.mqh>int ID = 1111;bool ShortIsOpen;bool LongIsOpen;int ticket;extern double Lots = 0.1;int slippage = 3;int order;int to;int init(){   ShortIsOpen =...
Hello, Im  programming an EA and i want to use custom indicator so I using the iCouston function.The problem is that this indicator is colors and not numbers(when its black buy and when its whit sell for example). How i turn this colors to signels that well tell the EA when to open order? How I writ...
What timezone is used for the dates in the time[] array passed to OnCalculate? Are those times in the Local zone (computer) or in the Current zone (the one set by the broker)?
  hi Parham, (1)
Hi Parham,Have you looked into mqllock.com?  Only $25/mo to have a dll automatically generated to protect your EA and be able to avail to your customers.  Am not a rep, just heard about it.  May need do myself in the coming year :) Jerry
Hi,  In an effort to simplify the problem I am having,  I have included two classe sin foo.mqh and bar.mqh When I compile them, I get: 'bar' - wrong parameters count foo.mqh Line 20 Column 9 which is this line in foo.mqh: foobar(bar  & b) { example = b;}  I have read up on other posts that deal with...
Hi, If I vary extern variables by the strategy-tester and check them within the EA again and may be re-set them in order not to be trapped by swapping in and out again and again - so I do: extern double EA_Threshold = 0.03;extern double EA_Breakout  = 1.4;double LimHi,LimLo,LimBreak;...int OnInit()...
There is an indicator provided with MT4 called SimplePanel. It can be found in Indicators/Examples. This demonstrates the use of an object oriented technique for drawing graphical objects. Does anyone know where I can find some documentation on how to use this?
Hello, I'm trying to do some mathematical equations within my EA , but the problem is one of equations  requires the first number of account's balance . For example if the balance is 506.60 I want to get this value "5" , if it is 432.32 I want to get "4" . So how can it be done ?  Note : To get the...
Hi all, 1. Is MQL4 able to recognize whether the EA was launched/stopped by user or by terminal? I've got a part of EA code to be executed only when the EA is launched/stopped by user himself and not when it is launched/stopped during starting/closing of Metatrader. Functions OnInit and OnDeInit...
Hi All, I am using strategy tester. I want to test on "USoil" and other CFDs or Futures or whatever they are. The problem is that "USoil" is priced in USD (ie its actually USoil/USD). My account is in GBP. So to calculate lot size etc, I need to know the GBPUSD rate. However, MarketInfo("GBPUSD"...
Hi,   There are some rumors that SNB will intervene again.The ceiling will be between 1.30 to 1.35 (CHF to EUR). This may happen during next week. What do you think about this?   Google: SNB will intevene 
Hi guys, I have array, 100 elements and I need shift all elements left, index 99 bye bye :-) from index 98 to index 99, 97->98, 2->3 .... index 0 = zero What is the fastes solution for it? Exist any special mql function? Or basic solution ...: int count=ArraySize(array);for(int i=count-2; i>1; i--)...
The consolidation of the platform between mt4 and mt5 is not yet complete. While introducing a marketplace for algo/signals is a commercial priority, feature consolidation should not be left behind imho. Support of multiple symbols during backtesting should be trivial given tick/bar databases are...
Hi   if I run an expert advisor on a chart, how can I have the history of trades done by this ea (since it was opened) to appear automatically on the chart with the usual arrows and trendlines between opening and closing of the position (like what I get when I run strategy tester and click on "open...
Hello,  At the outset, I apologize for my English, most of the work done by google translator. Thank you for your patience with this text :) Problem description: I need after the first Target profit were offset any remaining orders to break even In this code after the first profit Target is moved...
  OnChartEvent (5)
I have a situation where I want my code to do something when eg. a trendline is clicked. I also want to be able to move the line without the code being executed. My problem is that when I double click to select the line to move it, the first of the 2 clicks activates the  CHARTEVENT_OBJECT_CLICK and...