MQL4 and MetaTrader 4 - page 149

I opened a buy position of 0.01 lots and MT4 returned the correct margin usage. However, when I opened a sell position of 0.01 lots on the same instrument as well, the margin usage does not decrease, but stays the same. Can anyone assist me please? Due to this issue I am unable to continue working
I would like some help please, I am new to coding and have basic knowledge of MQL4 and recently built my first EA, I would like to help with this question please, How do I do code when price is bearish, price comes down and touches my MA, i want to be triggered into a trade going bullish. like a
How to code for the first MACD (Green) crossover only (if MACD second time crossover then it is consider as not valid signal)
  Avalanche  (5221   1 2 3 4 5 ... 522 523)
Avalanche is a win-win trading system that allows you to enter the market at any time on any instrument. Description: Two orders - BuyStop and SellStop of equal volume are placed at the same distance from the current price. When one of them triggers, the other one is removed and the same order is
I'm using MT4 and have tried several period converters. All seem to work fine as long as the symol is for example EURUSD or EURUSD+ Now that I've switched to a pro account, the symbols my broker gives me end with .. (EURUSD..) and it won't convert the timeframes anymore. I'm a little desperate as I
I'd need to create a queue structure with the below interface but the size can increase at any time: double bucket[]; Enqueue(double val) // add as last item in the bucket double Dequeue() // remove the first item from the bucket double ReadFirst() // read the value of the first item in the bucket
I bought an EA -- <Deleted>. I installed it in one VPS. Everything was right. It works fine. I tried to install it in another VPS but failed. It says - Product is purchased, but not downloaded yet. there is an button 'Install' in the right of above word. I pressed 'Install' button. A few seconds
Hi. :) I am a beginner so please be patient. I have a simple code and I want it to run once so I add two global variables. SELL and BUY. I don't know SELL and BUY it resets and code executes over and over again, but I need the code to execute once
Hi everyone... I'm not sure how it works with signal copying. could someone explain it please? I tried copying a couple of signals, but my trades would always come to a small loss, when the signal provider's trades always came with some gains. i signed up with the signal provider's broker, and
I am a beginner, sorry for the very basic questions. I have an ea I purchased and installed on my mt4 platform. I'm going to switch broker soon so will I have to reinstall the ea or can it stay where it is now? I also received another ea as a gift with my purchase. It was sent in my personal
  Last OrderType  (3)
Hello Folks, I am trying to get last Ordertype. (MQL4) Below code only keeps on working when first buy position is opened. but when first Sell position is opened it always gives 0 regardless of what type of position are opened further. I have no idea what's going on. any help would be appreciated
How to get all pending orders with prices and volumes in Broker? e.g. XAUUSD buy: 1850: buy volume: 100lots, sell volume: 20lots 1845: buy volume: 500lots, sell volume: 10lots
[Deleted]
Hi guys! I've wrote this code: double the_rsi = iRSI ( Symbol (), 0 , 14 , PRICE_CLOSE , 0 ); Print (the_rsi); and when I run this code in the backtest, the printed value is different than the value that I read in the indicator. What I'm wrong? Thank you
Hi guys! So I have below code: bool oldOrder() { datetime now= TimeCurrent (); for ( int i= OrdersTotal ()- 1 ; i>= 0 ; i--) { bool select = OrderSelect (i,SELECT_BY_POS,MODE_TRADES);int ticket = OrderTicket(); if (ticket == OrderTicket() && OrderSymbol()== _Symbol
Hello all Please shed some light on this discrepancy with iBands and the bands on the chart. Print (iBands(_Symbol,PERIOD_M5, 20,3,0,Ask, MODE_UPPER,0)); This line should give me the current upper value of the Bollinger Band on the 5min chart (with 3 standard deviations ). The result is printed as
hi there happy people, i want to be able to type in point numbers and not price number in an OBJ_EDIT to use to modify my active trades sl and tp, any help on the lines of code onhow to go about this
I currently coded an EA all in the OnTick function. Similar to this template: void OnTick() { bool longSignal = check MACD cross up; bool shortSignal = check MACD cross down; if (OrdersTotal() > 0) { if (shortSignal) OrderClose(Buy orders); if (longSignal) OrderClose(Sell orders); } if
the function below only calculates the dollar amount of the last open trade. I am looking to calculate the dollar amount of all open trades for the currency the EA is on. I can not find what I am doing wrong. can I get some help? thanks in advance. double LastBuyProfit()   {   for(int...
Hi all, My MT4 in my macbook suddenly cannot launch. Before activating the terminal, a window pop up saying shutting down the app. Anybody knows how to fix this? Thank you in advance. Josh
Hi everyone. I just begun testing my strategies on FOREX and there is a doubt I can not answer. This doubt is due to the difference between the candlesticks data retrieved from the broker and the same data retrieved from the metatrader server. This difference concerns both the data values themselves
[Deleted]
Calculating the Risk Reward, yet need help with the Divider for different Pairs, On the USDJPY if I divide by 1000 the return gives me the correct value, eg 2.6 Yet on the EURUSD the value returned is 10,000 time too large eg 14478.37 instead of 1.45 all help appreciated 😊 double reward_risk() {
Hello guys, I am struggling for many days (actually I left it on the side for one year but now I would like to make it work) to customize Fibo levels : color, width, style as well as RAY_RIGHT property. Unfortunately my code doesn't work even after have read the documentation carefully and retried
  MQL4 EA lot size  (3)
Hello, traders/programmers, Currently I'm developing couple of EAs' After setting conditions to open a trade, For example, lets say I'm using EMA crossover: For the first position I'm using 0.01 lot(s), for the second position I want to use different lot size, How can I set a different lot size for
Hi everybody, I am new here just enjoying MQL.... I am referring to Metatrader4 Release 4.00 (Mac). I noted an incongruence between the Mean value at 200 period as evaluated programmatically using the iMA function and that evaluated by the Moving Average Indicator on the graph. Of course I am
Hi. i create indicator for change pair chart. - MQL4 with button : ChartSetInteger(chartID,CHART_BRING_TO_TOP,0,true); my problem : "CHART_BRING_TO_TOP" runing after get new tick. i need chart change realtime when i press button. Thanks
Hi I want to make an alarm like this My expert has 1 or more positions at the same time. When the indicator gives the exit signal, the positions are closed. I want to give an alarm when the positions close 1- Close 1 position Eurusd +$20 Profit Comment Currency Position type Number of positions
I have been having trouble with my MT4 software from IS6FX company. And I tried to install MT4 software from metatrader4.com as the official program. But what I downloaded as MT4setup.exe was showed the MT5 screen. It's unlikely to happen except something totally wrong happening on metatrader4.com
Toolbars & Status Bar Not Appearing on MT4 Desktop Open? Using a PC and Windows 10, on closing then reopening MT4 from the desktop shortcut the Toolbars & Status Bar are Not Appearing on MT4 Desktop Open?? Any assistance would be much appreciated, thank you
Greetings! I am new to the community, working in mql4, and wanted to share my coding journey so far. I invite you all to join me towards my goal of creating a profitable EA! I hope to learn from everyone and hopefully contribute as well! Attached are two scripts for creating outer (major trend lines
I have been trying to make an EA, I used CopyRates in the OnInit function. And I noticed the values weren't refreshing as new tick data came or the new candle formed. So is it advised to place it in OnInit fuction? Thanks for help