MQL4 and MetaTrader 4 - page 583

[Deleted]
Can somebody help me, how can I write the code, because I am beginner of programming in mql. In My strategy are two Simple Moving Average and Average Directional Movement Index. I want open buy, when SMAB>SMAR && PlusDI>MinusDI && ADX>ADXLevel And I close it on TakeProfit or Stoploss. If the buy...
Hello  I have a problem with the values returned on tester when I use the genetic algorithm to optimize. Using the same parameter in EA, the return value of the function OnTester() dont match when I compare the test individually  with the return value in optimization. Here is the Step by step:...
Hello, Ok I am new to metatrader and forex in general. However I was wondering if there is some kind of template when placing order where you specify s/l in pips and t/p in pips instead of price? And then this setting used on every trade until you say otherwise?   Reason for asking is I am testing a...
[Deleted]
Improve Meta Trader 4 by providing account history detailed statement graph as a callable window from account history without need to print out history. This will make it better to interpret overall investment results at a glance.
can someone help me please? I can get this function to delete a pending order. What am i doing wrong? the way I would like it to work is when a open order is closed. this function will then delete the pending order. I keep getting the error 4108 for invalid ticket. I really have issue if another...
i am trying to make an EA for auto risk calculation but still not successful. i am trying to calculate risk from Stoploss value in pip. Example my stoploss is 10pip & i want to take the risk of 5% of my total Account balance. it should calculate from these two parameters... Here is my code i tried...
[Deleted]
Hi there, Please a little elucidation about mechanism of include loading. Let this scenario: there are some include (mqh) which in turn call other includes, i.e. relative to elementary soubroutines. So, any include-container is an auto-independent module because it can be compiled without errors....
[Deleted]
when I install MT4 on my win10(64) OS,I always stay this step as the picture giving.Help me!
Hi, I don't know where to send it, so I'm posting it here. In this page, https://docs.mql4.com/convert/stringtointeger The explanation says:  "into number of int (integer) type." and the return value is supposed to be long. And on a personal note, I think those functions are bugged... 
Hi rich people, after automatic update from build 920 to 924, the same backtest ended with a different result.   Since build 924, the spread setting is no more taken into account when backtesting using a read-only history FXT file (and only when the FXTfile is read-only) Using build 920, spread...
Hi, Iam working on an EA wich works with price action setup (pinbar only) and EMAs and I have doubts on which period should I make the backtesting. There are many articles of optimization and backtesting of stategy but there is no reference to the period to use. Should we use an random period? Or a...
Hi folks, I need to work an EA to identify support and resistance levels and I'm confused how to define and find those levels. I have read so much topics that I need your opinion about what is the most accurate. I have read the several articles using: - Fractals (https://www.mql5.com/go?link=https...
[Deleted]
Hi guys, I started fooling around with MetaEditor and I'm not able to do a simple printf. Here is my code double down = 10;double fast=iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,0);void OnTick(){  printf("fast=",fast);  printf("slow=",down);} The code compile without error, I'm able to make it run in the...
Hello! I amcurrently exploring the possibilities of automated trading. I wish to separate themacd zero lag into one indicator that only shows the MACD zero lag line and anindicator that only shows the signal line. I tried to work on the buffers and managedto get the MACD line separate but not the...
[Deleted]
Hi all, Do you know broker called xxxx ?
Hi all, I want to forward test daily data but Pepperstone's tick data goes back until only 2009, not enough for several walk forward passes using at least 3 years for the sample data. Perhaps I could use a broker on MT5 like Alpari, but how do I know how reliable their data is?  A search on forums...
Hello, I would like to print some information received form an external library. The best thing I have gotten working so far is passing an array of chars as a parameter and modifying each position individually. Is there a simpler solution? Like returning a string from the DLL or modifying a string
Hi All, I am trying to create a moving average indicator of the OBV. However when I attach it to a chart, it grinds MT4 to a halt and sometimes even crashed MT4. Am I doing something fundamentally wrong here? I tried to first use iMAonArray and when that did not work, then tried to do it manually,...
In the following Indicator I fail to see why I cant here the PlaySound sounfile ive assigned to the SoundFile object? Also it appears to overun my CPU? // Turning Pivot Alarms On/Off Input Variablesinput string SoundFile = "alert...
Hey there, attached you´ll find a screenshot which shows a white rectangle (OBJ_RECTANGLE) and some light blue lines (OBJ_HLINE). As one can see, the lines turn to light yellow when they cross the rectangle, which looks kind of "dirty". I could not find any option/parameter to turn off this kind of...
Hi,  I have an indicator which works very fine in live test. It has to calculate quite a lot and draw some objects in the chart. But when I do a visual backtest, the indicator sometimes starts showing me the right objects and after a time it shows nothing. Could it be, that the OnCalculate function...
Could someone tell me why the code below only closes one open trade per bar? e.g. I have two open orders. On each new bar ClosePending() is called. However, only one will close this bar and the second closes the next bar? Thanks in advance. //---------------------------Close Pending...
I am wanting to close a pending order (assume we are only talking about a OP_BUYSTOP here) if the (iMA-iATR) > OrderStopLoss() on every H1 Close calculation. If that is true, then delete the order, and send a new order out with the new calculations based upon where the stop should now be on the...
Hie Guys, May anyone help, Iwould like to code a Line that Closes/Deletes a Pending order, if not triggered,after a certain period of time (say 20 seconds). I have inserted question marks(?????) in the code below,indicating where I would like to insert the line. //----- OrderSelect(cnt...
[Deleted]
Hi Guys,,apologize me if my english is bad,,I'm from Indonesia,,and I want to make an EA but I got the problem How to close all opened order and all pending order if one of the opened order is already take profit? I'm very appreciate for all the forum to help me :D thanks.
[Deleted]
Dear all, I am creating my system to open two pending orders - BuyStop and SellStop Next, I want it to Close or Delete one of the Stop order when Buy or Sell is executed. Example: Case 1: BuyStop and SellStop are Placed BuyStop is executed - Buy. Then, SellStop should be closed. Case 2: BuyStop and...
[Deleted]
Hello I am looking Elliott Wave tools for mt4, such as the video https://www.youtube.com/watch?v=6TNAdYmmuTk or something similar Thanks
Hi, I have got some problems with introduce my conditions in reality. If any good person coul help me a little bit, I would be very gratefull.  How to convert these conditions below to code? For example every candle is 1H candle-> -positions can be opened from e.g. 08:00:00 to 21:59:59...
OP_BUYLIMIT Order placed at 1.09516 with Fill Price at 1.09264. Error says Fill Price is invalid but it looks correct to me. HELP. Thanks, Jim
I've issued an OrderSend as an OP_BUYLIMIT and received an Invalid Price error. The Ask Price and Entry Price: 1 .09516, The Fill Price: 1.09264. The SL Price: 1.08944, TP Price: 1.09644. These prices seem correct to me so I don't understand the error.. Thanks, Jim