Download MetaTrader 5

MQL4 and MetaTrader 4 - page 723

To post a new topic, please log in or register
Hi all, I'd like to code a simple indocator with draws a vertical line at the position where 2 SMAs intersect, but I have no clue how to... :( Maybe somebody can help me out! These are my current lines: //| Custom indicator deinitialization function |...
NEWBIE NEED HELP Excuse me, may I ask? I am a newbie in the MQL4 programming and is currently just starting to learn to make EA. 1. In an EA, I saw the following statement # define SIGNAL_NONE 0 # define SIGNAL_BUY 1 # define SIGNAL_SELL 2 # define SIGNAL_CLOSEBUY 3 # define SIGNAL_CLOSESELL 4 I've...
  mql code help (2)
Hi All, I am new to this mql4 programming. I want some simple code as the below simple logic. Everytime a trade is closed. I want to put the same pending trade for the same open price and profit taken and stoploss. ( For example: When a GBPJPY trade closed at 125.25 whose open price was 125.00...
i want to create the EA ROBOT of this my forex trading system EXPONENTIAL MOVING AVERAGE (SMA) =50 the trading idea For Buy Signal/Entry when the candle stick cross the ema 50 up the ea should enter buy. If there is open order for sell signal,the ea should...
Is there any way to delete the Account History [ie the complete Trade History] in a Demo account. I can always open a new account, but I'm hoping there is a more efficient method, for example, deleting one file.
To be more precise: int a= 5;int b=3;int c=a+b;MessageBox("The result of a+b is", <how to reference c?>, "Title"); So i need a way to reference result c i tried following: int a= 5;int b=3;int c=a+b;MessageBox("The result of a+b is", + (c), "Title"); But when i put script in a chart nothing happens....
Has anybody ever done a study of whether it's more efficient (faster or fewer resources) to run an indicator twice vs storing the value in a static variable? Specifically, I want to know if the Stochastics are moving up or down. Is it more efficient to run iStochastic() 4 times for each bar (2 for...
I have learned enough programming skills to build my own working EA'S. With this one though I need a little help. The way it works is, the signal is based off of the alignment of 3 different currency pairs and the RSI indicator on 3 timeframes of each. Also there is supposed to be a trendline break...
Is it possible to send messages to MT4 terminal from MT4 manager? What about news?
I did a search and found several people who have complained that the iMA function doesn't match the internal MA function. I found one who said (s)he solved it, but did not say how (s)he solved it. I'm setting the internal MA to 5 periods, shift 0, MA method Exponential, apply to Close. I'm using...
hi guys I am new to this i want get the actual value of an ema and subtract it from another value what i cant figure out is how to get the numerical value I am sure it is simple but i cannot find reference to it anywhere thanks in advance
hi, I have a small question for coders: In MT4: What is the correct way to check if a particular sound file exist. PlaySound(SoundFileName); If the SoundFile does not exist it seems I get no error message - it's just skipped. Thanks a lot.
Recently after my computer was destroyed, i acquired a MacBook Pro, but i failed to access any Meta Trader to work on it, rely want to trade but am stuck, please assist me if any one has a solution to my problem. Thanks Kats
Hi everybody, I want to analyse the news published by broker in order not to trade, if it highly impacts the market. I need datetime, header and the body of last news published. The file 'news.dat' is located in history folder of terminal, but it is updated once terminal is closed, so I can't use...
hi folks, I tried to modify one of my iondicators so that a partial number of Bars (=partial timespan) is calculated and showed in the chart window Only, i.e. for example that the Bars 50 to 100 should be used/calculated and shown by the indicator only. I tried some ideas with the...
Forex EA (Expert Adviser)Forex Robot Programmer Developer Hi,By Profession Im Software Engineer. But fromlast 7 years Im in Forex Trading. I 've developed many more Forex Robots EAExpert Advisers, and distributed to client as per given criteria. There are somany satisfied clients (National and...
I have an Indicator that I created, it's main purpose is to show the output from a function that I have created to form part of my EA. In effect the Indicator bit is just a tool for testing the function . . . It all works as expected when I open a chart and add the indicator to it, switching...
Hi all, While working on an EA which was losing horribly, I thought well if it is losing big, why not turn it around and make it winning big! I changed every buy condition into a sell condition and visa versa. So all my buy and sell orders should have been reversed and now every loss should be a win...
I got tired of compiling include files and seeing the 'warning "someFunction" is not referenced and will be removed from the exp-file'. By the time I get to the script that uses them all, the list is so long I have to scroll to bottom to see if there are any errors. So I created a bogus start()...
Can anyone help with this code im trying to make it enter a trade when the 2 LWMAs cross and #3 ema confirms trend but for some reason the LWMA crosses dont work, can someone look at the code and tell me where i went wroung?...
hey im new to this forum i see alot of good systems on here with good results, can anyone point me in the right direction of ea building, as in which strategy is best used for long term consistent profits e.g. indicators, price action or hedging. as of right now i built a simple ea that crosses 3...
//+------------------------------------------------------------------+//|                                                   Prodi5MAs.mq4 |//|                                    Copyright © 2011, PRODI GROUP...
So... the other day I whipped up a little genetic algorithm to find systems and then I remembered that the Strategy Tester has a genetic algorithm checkbox. So... would it make the most sense to write an EA that took inputs for Indicator1Type, Indicator1Mode, Indicator1Period, Indicator1Type,...
I have been experimenting with adding an additional index array to a modified iAO(). The new index is not intended to draw anything. Instead, I want that index to return a 1 if the "up" buffer has received the MACD value, and -1 if the "down" buffer has received the MACD. My thought was that,...
  #define vs global (11   1 2)
Is there any advantage to using #define instead of a global variable? My gut tells me that a global variable can be changes but a #defined variable can't. Is there any other thing to consider?
I know what is "SELECT_BY_TICKET" in OrderSelect(), but how about "SELECT_BY_POS "??? thanks for your help
I read http://geosoft.no/development/cppstyle.html#Naming%20Conventions so that my code can look like others. Now I can't figure out how to name something to coincide with Conventional naming. I know that I can do it any way I want, but I would like my scripts to look like the experts, so that...
Hi Noob here, From lesson 13 of the forex.tsd site I toyed with this just to learn to code and make it do different things for practice Also changed if from EMA cross to MACD cross Here is what I have simple macd cross and attempting to make a 5min with 4hr MACD agreement EA just to learn how. http...
Is there a way to check for this error before a trade is actually attempted?
Hello coders, I am still relatively new to coding and I am writing an EA that does pretty much what i want it to. It opens trades when I want it to, it closes them when I want it to, etc. However, I have run into a wall. I want the EA to have a maximum of 2 open orders at any given time. If there...