Download MetaTrader 5

MQL4 and MetaTrader 4 - page 418

To post a new topic, please log in or register
i wrote this small EA to modify orders. everytime i launch it, the error "invalid ticket for ordermodify" pops up. can someone please guide me where am i going wrong. :( i am really not able to understand how to use the order select function. any insight would be helpful :) extern int PipSL...
How to visualize volatility? I have gotten information about volatility stop. But, Is there any way of getting volatility as a chart form?
When I'm on an H4 chart, how do I determine when the bar has closed on a D1 chart? Thanks in advance, E
Hi How do i get the OrderOpenprice (), when backtesting. I have tried with this double open = OrderOpenPrice(); And it gives me right price sometimes but not always?
I'm using scripts and also a template with several indicators in MT4. If i want to use them in MT5 do they have to be re-written in MQL5?
Hi, I used simple code to write the ticks to file and found that indicators wrote more ticks than the same code in an EA. I used two EURUSD M1 charts in the same instance of MT4. I swapped the charts and got the same results Here is the results from indicator next to EA: And here is an indicator...
Hi, how could it be, that Volume[0] returns the value 38 pips but the difference between High[0] and Low[0] ist 43 pips. How could this be?
  Order modify (3)
if( dir == LONG ) {                  if ( OrderModify(ticket, 0, OrderOpenPrice()-sl, OrderOpenPrice()+tp, 0) ) {                      Print("OpenTrade: SL/TP are set...
How many ways to create object of a class in Java?
I have one ea in which logic is to exit trade if opposite signal come. but I want to now open buy and sell order at a time what changes I need to do       // Exit any trades in opposite direction.      //---------------------------------------         if (bullish)         ExitAll(SHORT);...
Hi I ve got three indicator. indA, indB and indC. The code following is what i m using in all of the three indicators. The key point is that they look back up to a N amounts of bars specified in the extern history variable. extern int history=300;.....start(){...    counted_bars =...
Hello Folks, I've recently created a simple EA which works in the 30min timeframe. Goal of this EA is to set a buylimit order each time a new Candlestick is generated. The limit order is set 30 pips above the open price, a stop loss is set at the open price. If the limit order is not triggered it...
Hi How to get a list of the trades with investor password programatically. From which host what are the API documentation part, code sample? One example it is the Forexfactory Trade Explorer. For sure it is possible, but I have no idea how.
I was using the libmysql.dll to read and write to a mysql db. However when fetching the rows sometimes returns empty rows althought the data is set correctly in the db. We (other programmer and me) tested it through and throught with the same data in all rows but this method seems to be instable for...
Hi, I'm not a programmer, and was wondering if there is code someplace that I can add to my mq4 file for an indicator. I have other mtf indicators, and like seeing higher timeframes on current timeframe. Can someone let me know if this is standard code that I could add myself? Could I provide a...
Hello i´m new in trading with MT4, i have change my broker to ECN. My previously broker havent Lot´s and the calculation is a little complicated, i miss a lot of trades coz i calculate to slow my risk value. What i´m looking for is an tool with this i can input my balance and how many % i will risk,...
forexparvenu
https://www.mql5.com/en/code/10650 plzz help...
I have a 2D array which I print to check on values: double array [][2];ArrayResize(array,count);for(i=0;i<count;i++)  for(j=0;j<2;j++)  Print(array[i,j]); the output looks like this: Can anybody please let me know if it is possible to get the array values to print side by side? thanks
Hi.. This is my code, when i test it, its always return false and execute OpenBuy function, why its happened please guide me :-       if (OrderSelect(TicketNumber, SELECT_BY_TICKET) == true) {         if (OrderType() == OP_SELL) {               CloseSell();               OpenBuy();         }...
can somebody tell me how to secure the ea through copy or edit when i give to someone ?Thanks
Hi, I have the same problem that describes this post in this closed forum ... https://www.mql5.com/en/forum/45531 Well, I will try to explain easily... EA ... #include <my.mqh>extern int a=1;void init(){return;}void start(){return(a);}void deinit(){return;} file: my.mqh ... #property library In the...
Hi ladies and gents I would thoroughly appreciate some help with tweaking a particular indicator that I have rustled up from somewhere. I've tweaked it to calculate the difference between High & Open, and between Open & Low values of the previous three candles. The code is pasted below. It works...
  Array resize bug in beta build 530 (74   1 2 3 4 5 ... 7 8)
There is an array resize bug in the new beta build 530. Let's say that you have the following compiled .ex4 code (i.e. compiled using the old compiler): string glbTest[];void init() {}void deinit() {}void start(){   ArrayResize(glbTest, 1);   int newsize = (GetTickCount() % 5);...
Has anyone dealt with drawing a rectangle on a chart? How did you go about it. And pst. Im not talking about a thick line running across the chart. A nice rectangle with spaces all round it.
I made the fatal mistake of not copying and pasting EA settings once the report had been run. I saved the report, and you know when you hover your cursor over the order number on the far left side of the document it brings up the settings briefly...well, how can i pull these into an excel file? I...
hi all, i wrote this script to set TP and SL for orders. i am getting error uninit reason 0; cant figure out whats wrong :(extern int PipSL =  10;extern int PipTP =  30;extern double Lots = 0.7;extern string BuySell = "Buy";int start()  {double SL;double TP;int pip = 0.0001;if (Digits == 2 || Digits...
I really don't want to be writing another thread about this, but I cannot figure out where I am going wrong? Am I being an idiot!? But as far as I am concerned, this EA should be working on the CORRECT symbol that is associated with the open position. Therefore, the line at the bottom where I have...
Hello I am building simple EA for showing Error messages ans numbers as test. The following codes open 2 orders buy and sell, the buy has a big lot 150 and that is so big and when i do it manually it gives me error not enough money, but when i do it as script the error gives 0 and that means there...
Hi Does anyone here know a way to measure execution speed/latency of a trade? I want to compare different brookers and vps servers. I know how to ping their ip in the cmd. But i dont think that shows the whole picture? For example i ping one of my ECN broker and the results on avg is 64ms In this...
  OrderProfit() (3)
Question about the: OrderProfit() Does it return the net profit aka the profit without spread or including spread ? Since the documentation says it returns the profit without swap & comission, but doesnt say anything about spread?