MQL4 and MetaTrader 4 - page 144

Hi I tried to create an EA using fractal indi. Since my EA only works every new bar, fractal only formed at least 3 bars later. In here I tried to find a fractal through looping. int CheckOpenPosition( int shift= 0 ) { int result= 0 ; for ( int i= 0 ; i<shift; i++) { if
[Deleted]
i dont know about coding but after i got this message EX4 file must be compiled using #property strict directive. i added #property strict to ea but i got this error '}' - not all control paths return a value pls help me fix it what should i change in ea
Hello to all professors I created a close code that works properly But I want it to start working after we had 13 buying positions, and also for sales positions, this close code will be activated in the same way after we had 13 selling positions. I wrote this and it works well for sales positions
I try to open orders in the same time (Buy and BuyLimit),but after second positions , buylimit sending does not work.Works only a Buy order. That is mean buycount >buylimitcount , but the point its buycount = buylimit in the first time Please , can you some one help me, where is the mistake ? This
Hi, I want that "Time second" command in Excel should refresh at every second. I know this command = MT4|TIME!USDCHF But it refreshes only when value of this = MT4|BID!USDCHF changes. For example, let at 9:52:40 Bid price of USDCHF is 0.92. Now if bid price does not change for 10 seconds then
I search EA for mt4. On specific setable time, if candel is BUY open BUY On specific setable time, if candel is SELL open SELL EA with chance to set TP and SL
[Deleted]
I try to find highest and lowest price during the last 3 months with following code double highestprice, lowestprice; highestprice=High[iHighest(NULL,PERIOD_D1,MODE_HIGH,90,1)]; lowestprice=Low[iLowest(NULL,PERIOD_D1,MODE_LOW,90,1)]; It works fine if chart window is D1 but gives wrong results if...
Hello, i have added a function that allows a Specific number of Trades per Currency pair (marked yellow), it all worked fine but then i realized that 3 other functions stopped working (marked white). i then saw that it is the return function that makes it happen. I tried to replace the return
  help EA build  (2)
//+------------------------------------------------------------------+ //| SmartON.mq4 | //| Copyright 2021, MetaQuotes Software Corp. | //| https://www.mql5.com |
  Expert for SHI_SilvertrendSig  (49   1 2 3 4 5)
Hi, I am a newbie. Please can someone help me to make an expert program from this indicator : SHI_SilvertrendSig. ( if it possible ? ) Thank U. May profit always with U
I am trying to install and run some EAs on metatrader4. All my code is in mql4. But when I install the metatrader4 it does not show mql4 codes in its data folder. Can somebody help me get up running with mt4 ? I am new to the platform and any suggestion will be highly appreciated. Thanks
Hello, can I & how can I install an alert so to follow the rate of a position on MT4 ? (on my smartphone)
Hello, I am trying to send an order with this function: OrderSend(currencies[i], OP_BUY, 0.1, MarketInfo(currencies[i],MODE_ASK), 10, MarketInfo(currencies[i],MODE_ASK)-0.0005,  MarketInfo(currencies[i],MODE_ASK)+0.001,"Sell", Peru); For this one I am trying to set a stop loss of 5 pips and a...
I would like to include a redistributable font using the #resource directive, as suggested here: If "::" is used in font name, the font is downloaded from EX4 resource.  However, I cannot get the compiler to recognize any font types. The error is always "unknown resource type". Has anybody had any...
  Help error !  (4)
//+------------------------------------------------------------------+ //| Morphius.mq4 | //| Copyright 2022, MetaQuotes Software Corp. | //| https://www.mql5.com |
hello, is this code right? I'm trying to use percentage on my Profit so when the AccountEquity() >= DailyProfitTarget it will close all of the trades I'm not sure on how to code the DailyProfitTarget tnx for the help void OnTick () double
Hi I'm trying to write my first indicator - at the moment its simply plotting the SMA (red in chart below), and SMA at 60min and 120min SHIFT (purple and blue respectively). When I test it over the last few months I get a number of regions where the SMA lines hold the same value for around a week eg
Hello, I get that error "Please recompile your product with new compiler" even i compile with version 5 build 2395 of 16 Dec 2021. How can i get a newer version of metaeditor
how to create close bouton for an indicator on the chart. on MQL4
Hi all, i am new to mql4 programming and i would really appriciate your help. I am trying to place a custom picture on the chart. I looked all over for working solution but i can not find it. I followed the example on MQL4 documentation but i can not figure out what i am doing wrong. Could someone...
hello, how do i close specific order using OrderClose(). i did get the value of the OrderTicket() but i cannot close it. i think i have problem on my code void CloseProfit() { double MAXprofit= 0 ; int TicketOrder= 0 ; for ( int i= OrdersTotal ()- 1 ;
Hi, I´ve bought an EA and installed on one account/MT4. When I try to install on one more account/MT4 on same VPS I get message: "Installation is failed". Where to start find the issue? I know I have activations left. Thanks
hello everybody i want to build an head and shoulders ea but i dont know where to start
Hi, I have already opened 5 trades. When open 6 trade I need to get all infos from last opened trade(6) (datetime,tradetype,..) How to do this? Regards
guys i have this code that calculates the total no of trades online for the current symbol. Somehow it only works when z == 0. If z>0 then the code does not stop and it continues to run. void OnTick () { int total,z,j; total = OrdersTotal (); for (j= 0 ;j<total;j++) { OrderSelect
Plz tell me MT4 code of bullish hammer candle
Hello guys, I am running into a zero divide error because my formula is based on the percentage change from the lowest/highest the last x bars and due to the nature of this it gives me a zero divide error. I am not sure how to solve this, if anybody could provide some insight it would be much
Hello, MQL4 does not seem to have an inbuilt function where a trade made by the user is detected. I am not even sure how I would go around defining it? Has anyone got an idea how to approach this problem? Thank you
[Deleted]
  MQL4 skip a bar  (1)
Is it possible to skip a bar after completing a trade. if ( Bars >LastBar+ 1 ) { LastBar= Bars ; } return;
Hello, so my target is to create Trade Up with trailing stop of all open order either it OP_BUY or OP_SELL after several "Distance" of pips going profit. So here is my code: void TradeUpTrailing() { double LastBuyOrderPrice = 0.0 ; double LastSellOrderPrice = 0.0 ; for ( int i