MQL4 and MetaTrader 4 - page 221

  Lot decimal places  (11   1 2)
Hello, In my code I use this sentence: LotValue = NormalizeDouble(LotValue, LotDecimalPlaces); Question is: How to know the right value for variable LotDecimalPlaces? I mean in an automatic way inside of the EA. I thought that value could be equal to the decimal places of the Step...
  Chart.mqh lib  (4)
Hello everyone, I recently discovered the Include libs in MT4 with such gems as Chart.mqh. I see that it gives MT4 access to the MT5 function, ChartIndicatorAdd(). Yay! So my question is, iCustom() in MT4 seems to work slightly differently than in MT5 and I'm having trouble figuring how to get the...
Hi, I have written the code below for trailing stoploss. it does work but on the other end it seems to keep spamming lots of error in the log too. which makes me confuse. input int TrailingStart = 150 ; //Trailing Start input int TraillingStop
I've tested EA with optimization back test (36 cases), I got just 1 profit case. So, I uncheck "skip useless result" for getting all result. I got 1 profit case, 1 loss case, and 34 zero profit cases. I decide to choose 1 of zero profit cases for doing normal back test, the result for this case I
Can MT4 deinit and reinit an indicator when one changes account or server? I have read around that there should an option for that, but I cannot find it.
Hi I am pretty new to coding. I am trying to take the moving average of the RSI. I tried it tis way: double r = iRSI(NULL,0,rsiPeriod,0,0); double fastMA1 = iMA(NULL,0,lengthrsifast,0,MODE_SMA,r,0); double slowMA1 = iMA(NULL,0,lenghtrsislow,0,MODE_SMA,r,0); but it is not working returns 0.0. and
Dear Sir, It is requested to you please help me to solve my issue On my signal there in setting shown double Metaqotes id how I can remove one because it's older I try to remove but can't
Hi I tried to working on the code that is detecting new bar function . My code consist of static datetime in a NewBar() function and the problem of this is that if I use that function twice the second will never working. this is my code: bool NewBar() { static datetime timeCur; datetime
Hello everyone, I don't normally do this, but I'm at a dead end. A little bit about what I'm trying to design. I am in the process of making a new class using CWndContainer as the parent class. The idea is to have an alternative to CDialog/CAppDialog that is more customizable and not as
I AM TAKİNG THİS ERROR (133) ERR_TRADE_DISABLED HOW CAN I FİX İT
My custom indicator looks similar to this it has 3 bands, and i am trying to code EA to set long position if bar close price crosses middle band up or is above middle band, but below upper band I tried different logic in my if statement with no luck. closest results i got is with current code where
[Deleted]
I am trying to determine the minimum and maximum profit/loss before the order closes. Somethings wrong with the code. Please review. Thanks OrderSelect(OrdersTotal()-1,SELECT_BY_POS,MODE_TRADES); { profitloss=OrderProfit(); if(profitloss>max)...
Hi, I'm looking for a code to calculate the lot size based on stop loss, but the stop loss is not fixed at a specific value. For example, stoploss will be placed at a MA value. Thanks for spending your time. Best regards
Something weird has happened on my pc... It seems someone has blocked my IP adress from mql5.com I mean it because I can connect from other IP adress... I tried to connect from my office and was able to connect from there. The problem is that my accounts are all from my home IP adress wich was...
Hello every one ! I've a probleme with my code.. like we can see on the screnn.. (I failed to put the screnn in the chat) http://image.noelshack.com/fichiers/2021/07/6/1613847387-capture-d-ecran-2021-02-20-19-51-28.png My code : if ( OrdersTotal ()== 0 ) ; if (bougie_H1>bougie_H2){
i am trying to get the period separator on h4 , but there seems to be something wrong with my logic , i keep getting Array out of range error. This is my code : #property strict #property indicator_chart_window int timefr ; int bari=- 1 ; int OnInit () { return ( INIT_SUCCEEDED ); } int
  BackTester Binary Options  (11   1 2)
Good Afternoon. How can i insert a backtester of the buffers like the image on mt4( for example: if 5minutes after the buffer 1 is greater than start count 1 win else count 1 loss)? #property copyright "Criado por Renato José" #property description "A pedido de Jeferson Menchik" #property
int counta= 0 ; int countb= 0 ; int countc= 0 ; int countd= 0 ; double HHV[ 10 ]; int HHVX[ 10 ]; double LLV[ 10 ]; int LLVX[ 10 ]; int counted_bars=IndicatorCounted(); for ( int i= 0 ;i< 100 ;i++) // GET CLOSES THAT ARE LOWER THAN PREVIOUS CANDLE'S CLOSE { if (
Heyeveryone, i've been at this one for a couple days (im really new to coding) so long story short, bought a book, they give you a simple ea to work with, i've been tweaking and trying to code my own strategy into it (my manual one) and i cannot for the life of me get it to work lol.. all im trying
There is a problem I experience when the EA initialized it should print but it doesn't always print. Just When you compile it print but open EA inputs and click OK and it should print from initialization . When you open inputs of the EA and click OK-- print doesn't happen from initialization in
Dear all, The code attached is used to detect the number of peaks and troughs in the current chart(the chart I used the EURUSD of period 1 hour) . But the scripts always alerts "0 peaks and 0 troughs" at the end of the script while I can clearly see the peaks and trough on the chart detected by
Hi I am really new to coding, and I am trying to code an alert system for a strategy. double fastMA1 = iMA(NULL,0,lengthrsifast,0,MODE_SMA,r,0); double slowMA1 = iMA(NULL,0,lenghtrsislow,0,MODE_SMA,r,0); bool staticlong = fastMA1 < staticlonglvl; bool ststicshort = fastMA1 < staticshortlvl; so what
Market Tab in MT4 terminal not showing all my purchased products on my laptop. I run MT4 on Windows 10. Please help I need to activate one of the products and update another for which there is an update from developer
  VPS Not Working  (3)
Hello Guys, I bought an RSI alert indicator from MQL5 market and it sends push notifications to the mobile application.Then I registered as a virtual private server ,and I added this indicator on 32 charts(not more) and I allowed the push notifications in the (tool box).But after all these steps I
I like to see currency strength meter on my metatrader4 platform. How can I do that
how are you all my friend please i have many product and the activation exhausted due to change the server can i get the old IP for my activated product before the mq5 can help me in this problem............???? thanks
I am having a problem with traversing bars backwards. I have a condition and if it is not met then I want it to change the bars it is focusing on and look backwards and stop when it meets the condition. I have this for loop int counter = 250 ; for ( int i = 0 ; i< counter; i++){ if (High[i]
[Deleted]
Hello. I would like ask a question . First of all, please suppose a case that Ask price and Bid price are the same price like the trade in a broker which offers the trade with no spread and only paying a commission per order (for example the trade in Broce investment limited .) As long as I...
Hi. I have this problem. Once a while my MT4 running on an VPS and copying a signal is dropping connection. The broker is ICMarketsSC. Any idea why is this happening and how to fix it
  Who can help me?  (10)
I use one indicator who can put buy and sell signal on the chart, ok now i whant to put in indicator a code to playsound alert when he put that sell and buy signal on the chart, i put playsound(alert.wav) code inside he work but the problem is he play that sound continuously without stoping, how to...