MQL4 and MetaTrader 4 - page 148

To post a new topic, please log in or register
[Help] How to create a MT4/MT5 Custom Volume Indicator?  I want to create my custom Volume Indicator with moving average, and some added custom indicator in that main chart and sub-window but there's no setting in SetIndexStyle() function to draw the bar volume indicator? Is there any way to make...
Hi there is my indicator that it does what it need to be doing but doesnt update on new candles - on history of candles works fine but cant get my head around it why it doesnt work for new ones: Are you able to help - or explain to me why is it happening? Its basically crossover for darma indicator...
Has anyone found a Harmonic Indicator that works?  Everyone that I find, has errors and can't run.  I'm using MT4  build 646. Thanks!
Hi guys, Im having a serious problem with calculating a MA in an indicator. In first look everything seems ok, but when attached to chart the MA goes crazy int i,Counted_bars;//--- counting from 0 to rates_total   ArraySetAsSeries(upcross,true);   ArraySetAsSeries(downcross,true);...
This is how I see the #SPX on my mt4 platform, how can I fix it?
I was wonder if there is any Function to put in my  EA to enable AutoTrading when it accidentally disabled. Is there any function to do it in MQL4 ???
can anyone please help me add my trade panel? i dont have the arrow next to the currency either, it wont show as well. id appreciate any help!
  Angle in degrees (21   1 2 3)
How do you measure the angle in degrees from the last bar's close to the close n bars ago? And no, the angle does not change if you zoom out, because zooming out does not mean changing the length of a unit, it only changes the perspective, it's like when you draw a triangle on a sheet of paper and...
hey im having trouble my pending order has disappeared  and i cant get it back, pending order is active but wont display on chart. It is selected in the options as pic shows, help please
Is it possible for MT4 Tester/optimization to access the GPU to speed up the process? Either with CUDA Minor or some other way?
Hi All I have a EA that works fine on Broker 1 account in mt4 and hosting VPS, when I load it onto another brokers mt4 it works on platform but not in hosting VPS. I get the following error in hosting : global initialization failed Does anybody have a clue how I can solve this. Thanks
Hi, I have displayed from the chart a text via OBJ_LABEL:            ObjectCreate(0,name, OBJ_LABEL, 0, 0, 0);           ObjectSetInteger(0,name, OBJPROP_CORNER, CORNER_LEFT_UPPER);           ObjectSetInteger(0,name, OBJPROP_XDISTANCE, x_pos);           ObjectSetInteger(0,name, OBJPROP_YDISTANCE,...
hi, Indicator moving average lines working well. I tested  with "-7" Shift parameter. yes it is working well. But the shift parameter not working well with object draw part. I am using SetIndexBuffer for draw lines. But i am using other method to draw object arrows. You can see it working well with...
Hi everyone: I have an EA that opens trades throughout the formation of a candle (meaning on a 5 min chart, it can open an order during the duration of the candle). I would like to have it where the EA can only open trades at the start of a new candle only, and not during the duration of the candle....
Hi, I would be thankful if someone can add a second RSI with a different period to this extrapolator with the deviations. I would also like to know about the line 105 of the code for(int i=MathMin(pastBars+LastBar-1,Bars-1); i>=LastBar; i--) av+=in[i]; av/=pastBars; av/=pastBars; if the value...
I have written the loop and inside it there's sorting for multidimensional array but when compile it giving this error. How can i solve this? double MyArray[][4];int cnt=0;int Jindex=0;int start(){ ...... for(int i=0; i<Limit; i++) {     ArrayResize(MyArray, Limit);...
how to get bar index (or shift) number from time? function datetime iTime(string symbol, int timeframe, int shift)can get datetime from shift, then how to get shift from one datetime? Or how to get OpenOrder's shift position. now MT only get OpenOrder's datetion with function datetime...
Hi I need to maximize the chart window when the following event fires but it is not doing any thing? How can I fix it? Playing around with the code below did not cut it for me. Any suggestions? Thanks void OnChartEvent(const int id,                  const long &lparam,                  const double...
Can't figure out if strategy tester as well as optimization is considering margin requirements for lots and considering it as draw-down against the equity? Seems like it should however leverage is never specified in the test unless you are using tick data from a reputable source which then would...
I'm an scalper and trading in 20 sec timeframe. I want to create an money manager for mt4. I open trades manually by myself. Many times my open trades go to loss fastly and breaked my stoploss strategy that is 0.5 percent of my balance. I want to have an money manager to close trade automatically....
Hello Everyone, I not really sure if this code would be more effective than having two functions for Ask and Bid orders. I am wondering if anyone has tried everything even remotely resembling this....
i am using a method where i open a basket of orders trading only the majors. for my exits i want all pairs to be closed when the pair that had the setup reaches a certain price level. for example, if eurjpy shows the strongest entry setup, and the other majors are also showing a similar attitude, i...
Dear Any Programmers, I need help fixing this code At the moment only the Add Missing Stop Loss is working. I need to Add Missing Take Profit to be working aswell. Below is the specific part of the file I need looking at. Thank you void InsertStopLoss(int ticket){   //Inserts a stop los into a trade...
Seems the more you optimize with everything the same from the EA settings to Symbol, Time-frame, Date & Spread. I have tried to duplicate what I found using open prices and it's not always the same. Not to say that all the settings are not accurate as they are. I am using Tick Data Manager and...
Sometimes you have so many inputs to optimize you get an ETA of several months to several years.. Which begs the question: What is the longest time you are willing to wait for strategy tester optimizations? And: What's the longest you ever successfully optimized EAs?
Most of the comments suggest closing down MT4, or change accounts. But if you need to keep the strategy tester running and just want to logout from the broker. it's very simple. I needed to use a VPN, and wasn't sure how the connection with the broker would behave with a sudden ip change, while...
Hello good afternoon, I need help in the programming of an Expert Advisor (EA) for MetaTrader4. In principle this EA I did with a builder (EABuilder), and from there I have been adding / modifying things (calculation of lot size, closing all open positions, start at a specific time or...
Hello, I am trying to find the biggest body of the last X (in this case 3 ) candles. Any help is greatly appreciated. This is what i have so far:    int index=0;  double delta=0;double delta2=0;   for(int i=0;i<3;i++)      {      // if (delta<High[i]-Low[i])      if (delta<Open[i]-Close[i] ||...
Hi everyone, I have started getting 'OrderSend error 130' when trying to use the strategy tester on a piece of code.  I am incredibly confused as to why this is happening, as I am running the code live (With the same broker) and have no issues. Similarly, I tried inserting this basic buy signal code...
Good morning. I have a problem with the DDE of MetaTrader 4. I set the DDE parameters in the OpenOffice spreadsheet. But it returns the value N/A. I also enabled the DDE in the Tools section. Where am I wrong? Thank you. Piero