MQL4 and MetaTrader 4 - page 629

[Deleted]
Hi all, I'm very new to Strategy Tester and have a hopefully easy question. I'm testing a simple EA that closes trades based on fixed stops and targets. If you note my optimizing variables below, I'm testing a stop every 4p from 14p up to 40p (7 passes), and a profit every $4 from $10 up to $130 (31...
This script prints only up to the third '7' digit on the OBJ_EDIT - thus limiting the length of CEdit and is a bug, or I miss something?   //+------------------------------------------------------------------+//|                                                    testCEdit.mq4...
Hi, I am still learning coding and need some help. I am trying to create an EA where an order is opened once the criteria is met, in addition it also opens a Limit order a certain amount of pips away from the current open order. I want the pending order to be removed/deleted once the open order has...
I can't launch Cherrytrade.com from MQL4 even though I put my necessary credentials for cherrytrade.com. What am I not doing in order to launch Cherrytree.com?
We are attempting to convert a WMA line used in OANDA's FXTrade platform to MetaTrader 4, but the code is not producing an accurate line. How do we convert a WMA30 to a corresponding SMA, EMA, SSMA or LWMA? Our EA code references LWMA. Any thoughts? Thanks. SM 
I want an EA to run so that at the creation of a new bar the EA iterates through 28 pairs and checks the value of a custom indicator for bars [1] & [2] (i.e. not the current bar that has just been created but the previous two bars). Unfortunately as I iterate through the pairs it seems that some...
My EA placed order at the price of 135.00 on EURJPY. as per conditions EA must close 50% of lot when price reaches 20+pips profit, when EA tried close the order spread difference become 2.5 pips to 50+ pips. so EA closed the order with loss of -33pips(Ask Buy Difference in spread). How to avoid such
You know there are O/H/L/C prices displayed on every chart as default. However when I display the Bid/Ask prices on different brokers, I found the Bid price isn't at the same step as the close price on the chart for a few brokers and it is behind the chart price. It is good on most brokers, but...
There is some explanation on this error here and here. But still I can not figure it out.. So please check out this code on an indicator called RMO, "Rahul Mohindar Oscillator". Coded not by me, but a great coder on another forum.. But after all the updates and changes to MT4 this does not work any...
[Deleted]
I would like to add password from decompiling, Expiration Time and User account in a indicator . I've read the article https://www.mql5.com/en/articles/359 , but I can not make it work.Can someone help me? The indicator is attached. Thanks!
Hi I'm trying to create a custom indicator, and I'm having trouble with what I need to do next in my code. There is obviously a lot which I need to add and perhaps some that I need to leave out. However, I'm finding it difficult what I need to do next, at the moment my indicator compiles with no...
 Hi! I don't really understand why mt4 should decide which timeframe i need to have. take a look at forextester 2. there i can choose my own time frame. i don't need to download a indicator. mt5 is better but the same problem. no custom timeframe. Ola 
First - sorry for bad English I am a beginner   I have two problems When I click to Button, how to call function (or, I do not know :) * procedure) and how to call the value of the radio button attached to the files thank you very much
I have a question. Is there any elegant way of how to resolve a current history folder name, in which the .hst files are accessed if no internet connection is open? Since there is another bug with FileOpenHistory() (I mentioned earlier in the forum), I have to use the Windows API for updating...
I have an indicator which will send notifications when candle patterns are detected. On only want it to run when the code sees a new candle as formed. I record the current candle open time to a file. So if the indicator is closed, and re-opened it knows where to pick up from. Here are the functions...
With the code below the instructions are as follows : After 10 bars it opens both a buy and sell pending orders each 200 points from the close price at 10th bar. Then, when price closes higher than one of the pending order price points it closes the opposite order.   // Input variablesinput int...
[Deleted]
Hello guys !I am a web developer and I have a good sense of logic programming . But I do not know much of MQL .Based on other indicators , developed one that gives great results in Binary Options , and would like to market it. However , I can not do the following:- Set password from decompiling- Set...
I'm trying to convert a whole number of pips to the correct price value. For example I want to be able to enter '50' and the function output 0.0005. To do this the maths is simple - 50 / 100000 (this is for a broker giving prices accurate to 5 decimal places of course) now the output is technically...
Hi, Is this even possible or am I doomed to reading them by FileReadString ? If it should be working then please look at my little test-code for this purpose below: string FileName = "Readfromfile.csv"; double FileDouble; int LastMinute; int cnt; int Handle; int init () { return(0); } int deinit...
Hi guys,   There are a way to define and change trailling stop manually via mql4 code ?    I need to put the trailling stop on orders created on my EA.
Hi everyone, I am using this function to return today's profit for a specific pair and specific magic number for today only.  but it seems to be totaling all magic numbers Does anyone see where I might be going wrong? double CCIDailyProfit(){  double CCIprofit = 0;   int cnt4 =...
  while statement  (3)
I'm using the 'while' statement with great success for some recovery work. Embedded is a counter (for # of tries) and after such # of tries there are checks/balances before looping back to the counter such to ensure things don't take too long and take a loss will be taken if things get out of hand
[Deleted]
hello friends, i need coding help for these both inidcators. in the link is a description and the source code from annother trading software. can someone translate the indicators in metatrader 4. thank you for help. dear marcus   http://www.vtsystems...
I'm losing the connection to my demo account, are you using the beta version without problem?
  Mql4 Report  (1)
Hey, I've tried to search for a solution to this but I have been unable to find a solution, even with a broad google search. Recently I've been making detailed reports on my performance, the EA has been functional for well over a year (perhaps 16 months), but my report only goes back 10 months. When...
Hopefully someone can help me out of this. In the following code opening a long position if the current price is higher than the previous candle's High. Then I set a profit target, and a stop loss. The profit target is static, so that works fine, but the stop loss is variable. I have set it to look...
Hi Guys, I've got a below standard piece of code for reading from a file with the following format: YYYY.MM.DD HH:MM; integer What I get returned for MD (date) is 1970.01.01 00:00:00 instead of the actual date on file. Do you have any solution guys? Thanks! int Handle, Number, Number2;string...
[Deleted]
Hello,    For learning purposes I'm looking at this simple indicator called test2 (basic ma cross) #property indicator_chart_window#property indicator_buffers 3#property indicator_color1 Aqua#property indicator_color2 Purpledouble Uparrowposition[];double Downarrowposition[];double signal[];int FEMA...
[Deleted]
Hi everyone, I wish to know if this is the correct way to calculate indicator's value in a for loop (throughout all the available bars): int OnCalculate(...) { //...  ArraySetAsSeries(SignalLine,false);  //...  for(int i=0; i<Bars; i++) {     double ma=iMA(NULL,0,MaPeriod,0,MaMethod,MaPrice,i); //....
Hi guys.   I am making a Binary Options Expert  for a customer, and need to block the Order Creation when the payout is below 70%, like in the image below because is only 65% not 70% or greather.     I try to get the payout information using the MarketInfo function, but not found the option. Can you...