MQL4 and MetaTrader 4 - page 43

I see EA's that have a nice rectangle as the information text background, works nicely for them. However, I can't do that with MQL4 scripting. It just doesn't work, I have tried everything that I thought of, googled around as well. My rectangle always comes white, no matter what color I give it
Hello, I need to know How dose the EA calculate the TP price by using Martingale strategy for each trade... If can some one share the formula with us in Exel sheet to use it .. Thank you for ur time
hello, i have migrate all the EA but i don`t see the expert tap. on vps. i see only (details,journals)
Is there a way to write code that will close your trade with the highest drawdown only once there are ten trades open and the profits from other trades equal the trade with the highest drawdown? Example: I have ten sell trades open (all in drawdown). The Code/EA should only act once this happens
[Deleted]
Hello, I am getting Error 130 and Error 136 when i am trying to add new SL using order Modify. Code : void StopLoss_NewsTrading( int StopLoss_NewsTrading_magic) { int gNewsTrading_SL = MarketInfo( Symbol (), MODE_STOPLEVEL) + 10 ; // Loop through all orders for ( int i = OrdersTotal () - 1 ; i
I've written an indicator that draws rectangles with 9 bars for me by clicking on a button and writes some information about the new box's ceiling and floor compared to the previous box. I was wondering if there is a way to change some of the boxes that have been drawn consecutively, which are 9
  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
[Deleted]
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
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 | //|
[Deleted]
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
[Deleted]
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