MQL4 and MetaTrader 4 - page 261

how can know an object is Back or Front ? i use this code but it return 0 always! long vv; ObjectGetInteger ( 0 , "FML_H1" , OBJPROP_BACK , false ,vv); Print (vv); or Print ( ObjectGetInteger ( 0 , "FML_H1" , OBJPROP_BACK , false ));
[Deleted]
I'm new to MT4. What would be reasonable backtesting time for a simple 1 or two indicator EA? Regards, MSquared
In my code to detect a MA cross and only buy when two MAs cross, it somehow does not detect a cross but still goes on and starts a position. Furthermore, these positions start by being a 'Buy', then closing, then all positions after that are a 'Sell'. What am I doing wrong? input double Lots =
Hello In this example you can see that if i do an optimization since 2019.06.13 it only shows 1 round in the Optimization Resaults and takes only 22 sec to complete it. However if I do the same Optimization since 2018 or before it does work fine showing all the combinations and its resaults, taking
[Deleted]
  Error 133  (19   1 2)
with GetLastError() i got Error 133 while trying to open an Order with OrderSend. Error 133 means "trade is disabled". What is the solution?
First I had subscribed signal in my pc. And I moved from pc to VPS and logged in vps MT4 . mql5 of course also logged in) But VPS don't received signal? How receive signal VPS mt4
For some reason MT4 will not allow me to sign into my account. It was perfect fine several hours ago. If I try to sign on it says authorization failed. My pass word is saved, so??? I recall this happening with Mt5 when I had it but only after 4 months. Do anyone know why this is happening?? I
Dear community, i have a simple question. How many periods are considered by the fractal indicator from Bill Williams included in MT4. It is very important for me. In the theory, we shall consider 5 periods, but how about the indicator? Best regards. Pierre
Hello my people. I am currently building an EA that place order once 5 & 20 exponential moving averages crosses each other, the issue is once the fast moving average crosses the slow moving avearge to the upside, the bot will immediately place multiple buy order and stop out will occur. So i
  EA using API  (1)
Is it possible to use a pricing feed api in a EA to trigger trades in mt4? Or is that not possible to use an outside api with a mt4 ea because of the the type of code used by mt4
I have a very simple trade strategy. But I do not konow why it can not run in expert mode. But my indicator work well. Is it possible to " trigger Open Trade and Close Trade " from "indicator"? I only need Open and Close order in indicator. only have a little trade signals in a long time, we...
So basically I'm trying to make the EA close a trade if it has been open for more than 48 hours. How would I do that? Thank you
I have a script which seems to be working but am trying to backtest so that I can improve on the results. But when I try to back test i get the following error: 2020.03.31 13:53:22.717 2020.03.27 20:30:00 EATest AUDNZD,M15: OrderSend Failed with error #(131) - invalid trade volume I've read all the
I'm trying to pull OrderOpenPrice from an open order to use for a sellstop order - a certain amount of pips for new order. OrderSelect(123,SELECT_BY_TICKET); double B3= OrderOpenPrice(); B3 is the key i'm trying to use. would this be the way to do it? or would I do double B3 =
Hello people, I am a newbie in coding bot for meta trader platform , but I have decent experience coding JavaScript for the web, I just build a simple mql4 bot using 5 and 20 ema to place order, but when I try to test it via strategy tester it keep showing both condition not met, please what am I
hi There is a way to run more than 1 back test ? i need to run many back test and each one spand 1 day
Hello; I have a code to count number Bars up ( down ) in 50 (number) bars; I just need help to modify this by 1-to add an input so that I change the number of bars to any number x, not to be redistricted to only 50 bars 2- a way to put two or more of this indicator on the chart side by side if I
below is an indicator that plots a band, upper, lower and center bands. Can anyone with some knowledge explain how the bands are calculated, please. here is the indie: #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 White #property indicator_color2
Hi people! I'm looking for some help, I'm creating my first custom indicators and experimenting with technical indicators and basic operations on my endeavor to find the holly grail, I'm using IStochastic and iSRI doing some basic formulas and operations and basically is the same for loop operator
We have experinced a problem about "Multiple Close By" process like that; I consult a big exchange office. They make hundreds of transactions in a day,buying or selling. They had approximately 900 transactions in their pool, and they made "Multiple Close By" as usual. But it was the first time, more
I am aware from other posts, the metatrader running through wine is not a perfect setup. Each time I restart my metatrader I have only few months of historical data in my history centre. - I have tried with downloading the data - I have tried to import them from third party. I have tried two
Why can I not display a line for the current price in my MT4 charts
I write a script to print zigzag point in windows double Buf_0[],Buf_1[]; // //-------------------------------------------------------------------- //-------------------------------------------------------------------- int start() // { int i, // Counted_bars; double zz[] ; //
My EA open 3 trades : BuyLimit 1.1111 BuyLimit 1.0000 SellLimit 1.2345 Then 1 BuyLimit 1.1111 is trigger, so the OrderType is changed from "BUYLIMIT" to "BUY". How to select the last modified trade "BUY" ? I use the following code : if(OrderSelect(OrdersTotal()-1,SELECT_BY_POS)){ }; double
Hello, I am new to this world of Mql4, I am just learning but I would like to know if someone takes me out of doubt or can give me an idea for what I am trying to do or tell me if that can be done. "supply" and "demand" of a specific session and historical days ago but these rectangles do not extend
What I'm doing wrong? When text or arrow (Wingdings) is changing, it overlaps to last one like on picture. You can see it on first arrow. Code is simple .. if ( iClose ( Symbol (),IsPeriod[x], 1 ) > iMA ( Symbol (), IsPeriod[x], EMA1, 0 , MODE_EMA , PRICE_CLOSE , 0 )){
  OrderTotal Help ?  (29   1 2 3)
int x= 1 ; //Global Variable if ( OrdersTotal ()<=x) ////////////////SELL if (CODE) { ticket= OrderSend ( Symbol (),OP_SELL,lotSize,Bid, 3 , 0 , 0 , NULL , 0 , 0 ,Red); } for (i= 0 ;i< OrdersTotal ();i++) { select= OrderSelect
Hello community, Before writing here I made sure I looked around to find a solution to my problem. Up to now I always did and I've solved "Array out of range" issues in the past, but know I can't seem to find the problem. I coded a very simple version of the Stochastic Momentum Index for MT4, all
Hi everyone, I'm new at scripting and I'm having a hard time with an EA that i'm trying to build. What I want the EA to do is close partial order (75%) when it reaches 10 pips or so in profit and at the same time move my stop loss to break even(or pip in profit from entry price). The issue i'm
Good day, I would like to ask for advice. I am a complete beginner in programming and I wanted to program a simple EA for the exam, which enters stores only on the basis of SMA. I added the function of shifting SL to BE and I also defined the variable PLUS, which is used to add the gain to BE