MQL4 and MetaTrader 4 - page 243

Expert advisor; 1-When conditions are met while a trade is open, it will re-enter the trade in the same direction. 2- It will update the TP / SL levels by calculating the average cost according to the trades opened. How can I add these features
I am a complete noob to building indicators;however i have searched throughout mt4 forum maybe i can find indies like this or similar already built but to no avail. read up some things and tried building one myself ,ran to all types of errors. what i have done so far by using mql4 refernce
How does MT4 tester considers the spread? Say I've inserted a 2 pips spread in the tester - does it adds 2 pips to Bid rates? does it perform the test as if the spread is 0 and subtract the 2 pips value from the P&L? TX
double dblNormPrice( double price, int digits) { return ( round (price/dblTickBase(digits))*dblTickBase(digits)); } double dblTickBase( int iCnt) { switch (iCnt) { case 5 : return ( 1 / 100000 ); case 4 : return ( 1 / 10000 ); case 3 : return ( 1 / 1000 ); case 2 : return ( 1 /
This is my first time trying to code an indicator, I can't seem to get my indicator to show on the chart. Seems like I'm getting some of the logic wrong, can anyone help to see through my code and tell me what I'm doing wrong. I know my calculations are most likely off. The indicator is supposed to
  EA help  (3)
How can I get EA to continue entering consecutive trading if there is no TP? It should update the tp score according to the average cost in each successive trade
Add Vline to chart for testing.. void OnStart () { //--- // Object On chart name = sName; string sTemp = "Vertical Line 55321" ; string sName; string sAfterIteration; datetime time1,time2,time3,time4,time5; datetime time6,time7,time8,time9,time0; int iType = - 1 ; string sType; ENUM_OBJECT iNum;
  multiple signals  (1)
how do you subscribe to multiple signals
I developed an EA for EURUSD only and it is working exactly as expected on some brokers. but when i tried it on exness, it started generating errors because of EURUSDm there. i do not want to use a user input field for currency pair selection. how can i resolve this issue
Hi all, I'm trying to code an ea that opens only one order after the cross of two averages; pull back strategy on the retracement of the two candles. I can't find a code that opens only one order for each cross even if a second condition of a pull back occurs. bool OneOrder() { int i =
I am seeking a kind of bar ,here I call it Price Quantity bar. Like time bar consists of time, tick bar consists of trades, volume bar consists of shares, Price Quantity bar consists of pips. Construction of Price Quantity bar, the basic unit of price quntity bar is just one pip, when price move up
I'm reading a book and it say's "You can monitor the value of a variable during debugging by using the Watch window inside the Debug tab in the MetaEditor Toolbox window." Where is the — Debug tab in the MetaEditor Toolbox window? I'm using MetaEditor version 5. Thanks.
In the following code why does lotsize only pass market test when 1.0 I get Invalid trade volume error 131 when i input 0.1 #property version "1.1" #property strict input double LotSize = 1.0; // Global variables int gBuyTicket;
Hi, I coded an EA and left it running on a vps for a month, then I tried to run the same dates and same inputs on the strategy tester the results are so incredibly different, it made 3x more profit on the vps and I have modeling quality 99.90%. Is there any other way of testing my EA that's more
I know the principles of the Gann fan and it's angles, but it seems impossible to get some reliable results in the MT4 charts. For example the 1x1 line in the Gann fan is based on a 1x1 square between price and time. This seems to be impossible because of the auto scaling, because this changes the...
  Surface Pro X  (10)
Hi Has anyone tried running MT4 on the new Surface Pro X
Hello folks, I am trying to code a simple EA that opens an oder on the opening of a bar (andcloses any open order there may be) I am having trouble coding the action to happen at the close or open of bar. I was using the following to determine if a new bar opened... bool newbaropen=false;...
Hi everyone this is my code to get the ATR value: double ATR = NormalizeDouble ( iATR ( Symbol (), PERIOD_CURRENT , 14 , 0 ), Digits ); when I print it the result value of that code is 0.0 even though I use double. I already check the ATR indicator itself from the chart and the result is somewhere
Hi All Can someone help me with the following indicator please. It counts the amount of pips the price goes up and the amount the price goes down. I've done that part but i can't work out how to display the value above and below the candles. The font size doesn't matter. I want the pip count of each
Hey, I'm relatively new to this So I am looking at subscribing to 3-5 different signal services but am aware these cannot all be done on the same account My question is, do I need to open the MT4 application up several different times on my VPS and link each one up to a different trading account? Or
How to set the color of a moving average in an EA,since i cant find any parameter to set it double iMA ( string symbol, int timeframe, int period, int ma_shift, int ma_method, int applied_price, int shift) Any suggestions? TY
So i have been sur4fing the net for Expert Advisers to assist with my trading strategy, So far i was able to get advise to buy second hand EA's, to help learn how they work. My first problem ,is i got a "Lifechanger EA" the past owner told me they can backtest this . Can any one help me work out if
I have this 4 Time frame heiken ashi. I don't know how the alerts work, but i want to get them only when an arrow appears on the chart. ( the arrows are also a part of the indicator). Currently am getting alerts several times including the times an arrow forms. I would appreciate any help it should
Hi team, I got a custom code. The arrow seems to follow the next candle open and it will not reflect after the 2 MA cross correctly without me refreshing the chart. PLease advise how to fix this thank you!! #include <stdlib.mqh> #include <stderror.mqh> //--- indicator settings #property
hi i have a code that draw a vertical line(only one Line).......but some times i need to draw more than ten Vlines (even 50 lines) at the same time... and the dates between the lines are not equal (or the problem could be solved by using cycle lines ) could we modify the indicator code to do this
hi, I've just bought an expert, I press to install in the MT4, MT4 asks for log-in, I use my email and the password, and it keeps telling that the password is wrong, anyone has any idea? Of course I'm sure the password is ok, it's the same I use on MQL5 Thanks
I have a Relative Currency Strength indicator that I use on Tradingview that shows the labels for each currency on the right axis. It's a quick way to see the ranking of the pairs. But I'm moving away from Tradingview. I have an RCS indicator for MT4 that I like, but it only shows a static label bar
Good afternoon all, As we're unable to have multiple templates for the Fib tools on MT4 like you can have with trading view, Is it possible to add multiple stock fib retracements so that I can have more than 1 settings. (such as have multiple fibs on the tool bar) Any help would be greatly
Hello, One thing I'd like to be able to do is change the order of the indicators in the data window at will, rather than having to unload and then load them in the correct order. Would you consider changing this in a future release? Thanks
Hello I am a complete newbie... is it safe for me to let someone setup a synchronized or mirrored account with their brokerage so that they can teach me to trade in demo while they trade live