MQL4 and MetaTrader 4 - page 101

i need to plot OPEN, HIGH,LOW,CLOSE values of the current time frame candle in a chart along with script name, time frame chosen for the chart and server timings
Morning all, So I have an include file, string formatted, which is supposed to go into the body of an email when the SendMail function is called. Despite me working with #include files in order to avoid coding duplicate coding or text, this particular include file is not being inserted into my
Hi, After creating an object CButton on a chart, to delete it from the chart I am using the Destroy function. CButton Button_1; Button_1 .Create( 0 , " Button_1 " , 0 , 0 , 0 , 0 , 0 ); Button_1 .Destroy(); However, when creating an object CButton and adding it to CAppDialog, for some reason the
Hi i got and issue to make EAs work on "Offline" Renko Charts i've tried *every* renko generator there is and NONE made the EA trigger the OnTick() function (i put a simple "Print" at the beginning of the OnTick( ) function) list of the generators i've tried: renkolivechart_v600 EA_RenkoBuilder...
Hi ‌My code to download FF news don't work anymore since this WE ! Anyone using webrequest to download news has this problem ?? ‌result = 0 bytes downloaded.  No modification in the code since last week when it was always running well since months. ‌‌both webpages https://cdn-nfs.forexfactory...
I need help bros. I have two pending orders in market. when one order is execute,the remaining pending order need to close. how can delete this pending order. ` OrderSelect ( OrdersTotal ()- 1 ,SELECT_BY_POS,MODE_TRADES); //selecting tha last order {
Hello! I would like to close trades on filters of TP and SL, instead of placing SL and TP in OrderSend() function. I find it difficult to identify when a trade is closed on SL or TP, and as I may need to trigger some actions when TP or SL is hit, I find it more easier to use TP and SL as filters for
Hi everyone, I have 4 rules (A-B-C-D) to open a trade. The entry would be determined by the rule A and the rest is a confirmation indicator. From this 4 rules I need 3 including the entry rules to be true, the conventional way is to make it like this: if (A == true && (B && C == true || C && D
Hello could anyone help me with a script regarding taking profit. I am looking to take profit on a % of the account balance. for example if profit reaches 0.25% of the total account balance, close all open position, or if account equity > account balance by 0.25% close all open positions. Kind
Hello Need help with the the following add on's please for MT4 Mac:- 1. adding timeframe button of my choice e.g 2hrs, 10 minutes etc.. Regards Phil
Hi, how to add extra pip after moving average cross complete ?? Because i try put /point but not working void SetupTrade() { double StocFast = iStochastic ( Symbol (), Period (), Kperiod, Dperiod, Slowing, MA_Stoc, Price_Field, 0 , 1 ); double StocSlow = iStochastic ( Symbol (), Period (), Kperiod
Hi, this is my code and works very well but how can if I have 1/2 points in negative amount then need to call something? MathAbs (( NormalizeDouble (((OrderOpenPrice() - (lowest- 30 * _Point )) / MarketInfo( Symbol (), MODE_POINT)), MarketInfo( Symbol (), MODE_DIGITS))) / point_compat * 10 ); So
  MT4 Oanda  (1)
I haven't used my MT4 on Oanda for quite time. When trying to log in, it says that it cannot connect because it is an old version. I do not want to start from scratch as I have custom indicators, profiles, ea's etc. Any suggestions or solutions? Thank you
I want to add ON/OFF button,I created the button but I do not know how to type the script which will enable/disable my candles. What should I cling to? #property copyright "Æèòíåâ Ìèõàèë aka MikeZTN" #property link "ICQ 138092006" #property indicator_chart_window #define BUTTON_NAME "Button" ;
Hello all, Need help in my EA. I'm trying to take only one trade if hull indicator change the trend slope. I've manage to make position open but when a position close another one immediately opens and I don't want that. I don't know how or what is best practice to do so. If anyone know any reference
Hello lovely people, I would want to code a trailing stop in money instead of in pips. I will gracefully appreciate any help on how to achieve it correctly. Below is my attempt at it. input double TrailingStop = 8 ; input double TrailingStep = 2 ; input double TrailingStart = 2; bool res; void
double kdj= iStochastic ( Symbol (), 5 , 5 , 3 , 3 , MODE_EMA , 0 ,MODE_MAIN, 1 ); Is my code OK?
This Script is capable of downloading forex news from the website( https://nfs.faireconomy.media/ff_cale... ) and uses two includes files that helps it with downloading the news . As you can see it uses PrintFormat to write the news. So what I want it to do is to display news on my chart top left
Hello, I have created a simple MT4 indicator that has array buffers and on tick the value of the buffers at position 0 is changed. Everything works correctly. But after some time the buffer values get either currupted or mixed. I visualize the values on indicator_separate_window as a histogram. Any
This isn't really my function. I copied it from somewhere (possibly this forum) quite some time ago, and now I am struggling to understand how to fix it. What it does: I determine an amount in currency and I choose between StopLoss or TakeProfit. The function is supposed to return the exact price at
Hello Looking for an MT4 EA that handles manual order with TP,multiplier,Distance,Max Lot,Max Orders and Trading Hours (this is not much important) Thank you
  Empty Market tab  (8)
Hello, when browsing on the market on my MT4 terminal, I clicked on a indicator which interested me, but when I arrived on the page there was no information about the product. I thus went back to the original market page, but now nothing appears in this either. I checked the journal, and it seems
  Integer division  (6)
#property strict #define SOME_LENGTH 5 #define TEMP ( int ) NormalizeDouble ( MathPow ( 10 , SOME_LENGTH), 0 ) #define DIVIDER TEMP * 10 #define DIVIDER_CORRECT int (TEMP * 10 ) void OnStart () { int someIntegerValue = 12345678 ; Alert ( "using DIVIDER: "
Hi, I want to store stoploss in StopLoss manually also if I change. I need to get only first StopLoss, and then change in variable only first time. If StopLoss has been changed in the future, in my variable this not change. My code: double point_value = 0 ; for ( int Counter = 0 ; Counter <=
Hi, I can see on details statement Maximal DD not means floating, but this is for me very important. How can I calculate Max DD for floating in my EA for each symbol
  Mean in MQL4  (1)
Hi how would I find the mean equation ((Price1+Price2+...Price(n ))/nbars) in MQL4, would i need to calculate this or is there a predefined indicator
  MathPow Function  (6)
Hi this MathPow function keeps showing as 0, ideas? the negitive value is MathPow ( 2.71828 ,-B/A);
If for example I made a string, a bool, and a string array, string A = "CCC333"; bool Check; string List[ 4 ] = { "AAA111" , "BBB222" , "CCC333" , "DDD444" }; And I want to check if the string A exists in the list (where the bool "Check" should turn out true), how should the code be written? I
Hi all, I'm trying to allow the indicator I'm building to signal entries for me by printing an object (an arrow) over/beneath the bar that the signal happened at. Here's what I've got so far – it's not working, and I'm unsure where I'm off. My buySellSignal buffer is being filled with the proper
[Deleted]
Hello, I would like to check if my last three closed sell or buy trades were profitable, and change a string value depending on it. I have this code (MT4): for ( int i=(OrdersHistoryTotal()- 1 );i>= 0 ;i--); { OrderSelect (i, SELECT_BY_POS,MODE_HISTORY); if (OrderSymbol()== Symbol () &&