MQL4 and MetaTrader 4 - page 42

To post a new topic, please log in or register
Hi I try to create Arrow by X,Y distance but not success. I know Object Arrow need Time and Price for place it.But I want to create by another way. How to convert X,Y to Time and Price. Or How to create arrow like this. Thank You.    string name_m1 = "m1";ObjectCreate(0,name_m1, OBJ_ARROW_UP,0,0,0);...
  RENKO BARS PROBLEMS (15   1 2)
Hi, I'm using renko bars in my strategies, but I have 2 problems with testing EAs by strategy tester. 1. Even if I download good data where's no discrepancy between any timeframes and I have 90% modelling quality when I convert it to renko there're a lot of mismatched charts errors. Can I do...
This is the same TL but display different values, is it possible to have them sync
Hi, I am working on an indicator which I just had run in the debugger. As this (due to a loop of loops of..) runs tooooo long I killed both the terminal and the editor. Now after some changes I want to start the debugger again but the button to start the debugger is grey and disabled ?? I restarted...
I'm building an EA for a strategy that uses information of an indicator from the close of the previous bar. Not the close price but the information that the indicator gave at the close. I tried looking at iBarShift but that gives the bar's info. Bars and iBars is no help either. In the attached...
Hi Coders! I have an indicator, called: ptl 2 & alerts (attached) I would like to use it in an EA with the iCustom() function. I would like to run the EA on a M5 chart, and use the Indicator with TimeFrame="15" input variable. But there's a bit problem. The EA reads diffrent indicator datas. When I...
The question is how to get breakeven point for a grid of orders. I think it could be storing the Ask/Bid Price when OrdersProfit=0 and then apply TP distance to that price. But if I want to draw a line in that BreakevenPoint, how do I calculate its price?
Samkelo4664
How can I reverse $10 back to my visa card
Hi  I need to check stop level before sending OP_BUY_STOP and OP_SELL_STOP. But I'm not sure about the price which I should check for distance and compare to stop level, is it ask for buy stop and bid for sell stop? and should I care about the distance between current market price and pending order...
Hi guys, I open some charts, draw some lines and rectangles and then I drag the following script into one of the charts.  This script should print the names and types of the objects found in all charts. Interestingly, the names are all correct but the object types are all -1 except the objects of...
  Functions in the loop (15   1 2)
To simplify the code, I was trying to integrate functions in the loop this way:    for(int i=0;i<OrdersTotal();i++){      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES&&OrderSymbol()==Symbol())){         double LastBuyPrice=0,LastSellPrice=0,LastBuyLot=0,LastSellLot=0;...
Hello, I am trying to code my system however after compiling it returns the "not all control paths return a value" and when I double click it shows its in the following block, could someone please point out the problem. Thank you in advance bool CalculateCurrentSellOrders(string symbol)  {   int...
Hello Gents Would You Plz Help Me Modifying This indicator to MTF one  Many Thanks mns
Hi. I'm sort of new to forex. I have a question. Let's say I open a position; any position. There's an initial spread cost (ex. a spread of 3). Next, let's say I'm at a profit of +0.12; and now I decided I want to close myposition. Here's my question. Will my profit be +0.12 - the opening spread...
I coded a simple RSI OB/OS algorithm. It give me sound alert in normal time frame charts. but after adding to renko charts it only shows arrows on chart but not sound alert or popup window. Can anyone help me with this
Hi, How to convert indicator to EA? Anyone can tell me. What support to change if indicator convert to EA? I'm newbie...
I'm trying to close a grid of orders at specified distance from breakeven point from a void function, without success. This is the code: void CloseGridLong(){   for(int i=0;i<OrdersTotal();i++){      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)){         if(OrderType()==OP_BUY){       // Select BUY...
I am trying to figure out how to make takeprofit and stoploss values accurate.. If for example stoploss is set at 200 points it shows a value of 1.79? If that stoploss is set for 200 points then that value of 2.00? Should it be coded differently so it makes the correct level? If a stoploss of 213...
Assuming I have VPS for MT4, and I want to create multiple MT4 accounts, and apply a separate EA to each account,,, the question is that doable, to keep all accounts trading at the same time?
I have lost access to MQL4 Storage and 100's of programs that I have written. I took a few months off at the end of the year, when I returned to trading with a new computer system and a fresh download of MQL4 my programs are not available through storage anymore. Anyone know how I can retrieve them?...
  RSI EA code help (17   1 2)
Hi...  Need an indicator to trade RSI. where if the value goes above 70 and retrace below 50 I enter short wher if the value goes below 30 and retraces above 50 i enter long  need help with teh code 
Hi, Does anyone know of code floating around that adds consecutive candle volume if they are the same colour. Eg. Green(volume), Green(Volume+previous volume), Green(Volume+previous+previous), Red(Volume), Red(Volume+Previous). Then plot them like the standard volume chart on mt4 ? I have had a look...
Hello experts, I'm wondering if it is possible to write a script/EA which will make edits to a loaded EA without removing it and reloading it. The EA is compiled and I do not have access to the source code. The only way to adjust the settings is via the GUI dialog box (right-click window -> expert...
Hello, I use MT4 and realized I set SL to a certain price level of an asset, in real SL get's hit a lot earlier, since it does not seem to take into account that the trade already starts with a minus, guess is called spread. Eample I sell BTC and set SL to asset price 5300 MT4 showing me a loss of...
Hi all, I'm trying to create a function that on every Bar, determines the Maximum and Minimum values of the MFI. But it's not working. Can someone give me some hints ? Appreciated. //---Function Max and Min values int MFI_Period = 14; double Max = 0; double Min = 999999; //emulate infinite double...
I have 2 MT4 accounts, before I log in my second account. I should log out the first account, anyone can tell me how to log out, using android samsung galaxi tab 8.9. Thank you in advance
Have seen response to select last open order, but not if we need to select last buy or last sell. I have this functions but no way. // Code for LowerBuydouble LastBuy(){   double Price=0;   for(int i=0;i<BuyOrders();i++){      if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)){...
Hello  I need to Open a new Opposite order immediately after stop loss hit if i have a buy order and the Stop loss hit immediately open a sell order with a stop loss at the open price of the previous order and a take profit target 2 times the SL and if i have a sell order and the stop loss hit...
If one entry make profit ,how can open next same orders into this direction in EA How can code it.
Hello, can anyone tell me why my ordersend function wont execute?  #property strict double vbid= MarketInfo (Symbol(),MODE_BID); double vask= MarketInfo (Symbol(),MODE_ASK); double StopLoss= OrderStopLoss(); double openprice= OrderOpenPrice(); extern double LotSize = 0.1; //---------trailing stop...