MQL4 and MetaTrader 4 - page 36

  Auto Save File  (2)
Hello; I wish to autosave a preset file (yourea.set) in the Presets directory of MT4 I know there is a command to do that for template files (ChartSaveTemplate()) but I can't seem to find a similar command for presets. Does anyone know? Thanks
[Deleted]
This is a very stupid question. I coudn't find where my EA code saved. I created "closeTrade" EA program, and saved at metaTrader ->experts folder. It should generate one ex4 file and one mq4 file. I opened up the folder, nothing is there. first image is a screen shot of expert folder. if you...
I wrote a custom indicator and it works fine. I want to implement automatic placing of orders through EA calls, but I always cannot get the correct indicator value. void OnTick () { //--- //printf("0.time: "+time); //printf("0.Time[0]: "+Time[0]); if ( TimeCurrent ()==Time[ 0 ])
Please give me indicator heiken ashi rsi oscillator mql4. Thank All
  MQL4 Add indicator to chart from EA  (64   1 2 3 4 5 6 7)
Hello people, I am trying to solve the current problem. In mql4 there is no command which would add an indicator to a chart like in mql5 ChartIndicatorAdd() . It is really sad. I want my ea to initiate an indicator. Scrolling forums i came across with such solution but it isn't working properly
Hello, I am adding a Object to the chart which calculate Time remaining for the candle. Code void Object_Time() { int Object_Time_16 = Time[ 0 ] + 60 * Period () - TimeCurrent (); double Object_Time_8 = Object_Time_16 / 60.0 ; int Object_Time_20 = Object_Time_16 % 60 ; Object_Time_16 =
  'MA200' - unexpected token  (21   1 2 3)
The system gives me 5 errors but I don't know why. Someone hepls me pleeaaseee?!?! extern int period = 200; extern int applied_price = 0; extern int barshift = 1; extern double TakeProfit=120; extern double StopLoss=150; extern double Lots=1; double currentprice= Open[0] double
Hello all, I want to draw trendline as forecast line so I want the line start from price Close[0]. The problem is, I want to draw the object automatically everytime new bar appear, any idea so I can update my object everytime new bar appear
Hi, I purchased a subscription to VPS for my platform MT4 brokerage account. My problem is I cannot connect to the VPS server from my platform, any help out there, thanks
[Deleted]
Hi all, A year ago or so I started with coding mql4 expert advisors. I have no programming background so I had to learn everything from the start. Currently I am at the stage where I can code most common strategies. In order to improve my coding skills and gain experience, I am offering to code...
Quick question: Why, despite telling it display the price in accordance to the appropriate number of decimal places of the chart, does it constantly fail to include the "0" when the price ends with a zero. I have the following: double CurrentBarOpenPrice = NormalizeDouble (Open[ 0 ], Digits );
I could literally scream I'm sorry but in what universe is MQL4 seeing the following : "+DoubleToString(0.56 * 100,0)+"%"+ as "56.00" and not "56%". The words "sick" and "tired" do not cut it, especially when this only happens with one currency pair, and no other. Just why
Hello.. What is the maximum value of a magic number
Predefined functions are not working. They are not turning into Pink color and so I get an error that it is an undeclared identifier. Any ideas?? //+------------------------------------------------------------------+ //| Predefined Variables.mq5 | //|
Hi all, I am programming an indicator and I wonder if it is possible to use non-standard timeframes in MQL4. Basically, I am thinking of using M10, H2, H6, H8 and H12 which are all available in MT5. Is this somehow possible to use them in MQL4? Currently, I was trying something like iHigh(_Symbol
Hello, How OnTimer work with Oninit. Every 60 seconds all four Print will be executed? bool assignVal=True; int OnInit () { Print ( "Checking Print 1 with Timer" ); if (MarketInfo( Symbol (), MODE_STOPLEVEL) > 0 ) { Print ( "Checking Print 2 with Timer" ); //--- set timer
[Deleted]
The function DayOfWeek() returns the current zero-based day of the week (0-Sunday,1,2,3,4,5,6) of the last known server time. My broker's (FXopen) server time is GMT. The server opens a new daily bar at GMT 00:00. Eastern Time (New York) is GMT-4. If the forex market officially closes at 5:00 PM on...
Hi, is the max amount of charts that can be opened in MT4 99 or 128? I saw on this forum that some people say it is 99 and some people say it is 128, so which one is it
Hello, I am trying to store one small value into file. Simple, Rule If file exist, read the value else create new file and store the value When OnTick condition executed, Rewrite the value. But i am getting an error 5011 and when i open the .txt file, it always empty and blank. How to solve this
As in topic what is the difference between them? Documentation in mql5 seems to be avoiding proper definition and examples for extern type
Hello Guy's Iam Newbie Im Getting an ERROR in Mt4 Like this Mentioned Below Need Your Help Community Thanks in Advance cannot open file 'C:\Users\Shaik\AppData\Roaming\MetaQuotes\Terminal\5D49F47D1EA1ECFC0DDC965B6D100AC5\MQL4\indicators\FFCal.ex4' [2]
Hey! I am trying to change features such as the color of candles and background color so they automatically load when the EA is placed on the chart, I'm not sure why this function won't load in the Mq4 file for the EA, so I'm trying to change the colors in a separate source file then #include it in
  Parenthesis  (5)
Has anyone encountered anything like this? I have extensive code, around 2500 lines. When I point the cursor at a parenthesis, it is highlighted the same as the corresponding opposite parenthesis. But when I mark one of the last brackets (last 4 right -} ), it doesn't highlight. So I find the
Hi all, Trying to find the highest amount of open orders but but this code gives the same amount for TotalOpenOrders and MaxOpenOrders. Thx a lot. Amir int TotalOpenOrders = 0 ; int MaxOpenOrders = 0 ; for ( int i = OrdersTotal ()- 1 ; i >= 0 ; i--)
Hi I have an EA that uses a higher TF to determine a moving average crossover then goes to a lower time frame to determine when to get into my trade based on my conditions. Is there a way to backtest this or optimize it ? I was told there isn’t a way in mt4 and wondering why this is ? My developer
[Deleted]
Hello, Is it possible run existing EA from a script/ea ? If so, is it possible to define the ea settings like Pair, Timeframe and parameters ? Thanks in advance, Manu
Hello, I am adding new feature in my EA, which close trade automatically when it fulfilled defined earning set by user and than it redefine with value again with new Account balance. Example : Account Balance = $1000 Target Percentage = 10% (10% of 1000$ = $100) When Account balance is above $1100
Hi, I am trying to write an indicator that puts an arrow below or above the current candle if it's Low/High is lower/higher than the Lowest/Highest value in the previous 120 candle but I can't work out why my code is putting arrows on every candle. Would appreciate some help. Here is the code
  OBJ_TEXT not showing  (11   1 2)
I just want to print a small OBJ_TEXT in the right upper corner of the main chart window showing SWAP LONG and SWAP SHORT. I can print the values and show it in a comment but OBJ_TEXT is not showing up at all Am I missing something? #property version "1.00" #property strict #property
I have heard rumours that Metaquotes will be phasing out Metatrader 4 soon. Is this true