MQL4 and MetaTrader 4 - page 423

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...
[Deleted]
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] ||...
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
Hello people! Can anybody help me code an alert (see Screen) on the FX_FISH_2MA indicator such that when new candle opens and price is equal or above the specified value , it would sound the alert wav file once. Thanks alot.
[Deleted]
  alert iterations  (17   1 2)
I have written a custom indicator that puts up an alert box and play the alert sound when my criteria are met, but it makes the alert sound on every tick. How do I make sure it only alerts me on the first signal and not on every tick. eg: if (X,y,z) { Alert("Signal") } how do I make sure the above...
I am hoping somebody could find the problem. i have open orders on the vps side. the ea is working as it should be. the problem is when i re-sync the terminal, all open orders get closed automatically. here is the ea  that i used to make my own ea. the basic structure  for the condition and the way...
Hi, any help is appreciated, I can't figure out why my EA only does buy positions.  I need it to do sell positions also, on multiple time frames simultaneously. Here's the code: input int            MagicNumber  = 900;     //Magic Numberextern int           period_RSI   = 3,...
I dont know how to make a math with time. Can anyone help me to code this : oldtime=0; if (oldtime+5(minutes)<TimeCurrent())    {trade....     oldtime=TimeCurrent()} Thank you!
  TSD DS jurik BrainTrading  (40   1 2 3 4)
I decided to post it here as a good setup of the indicators. Basicly - it is not the trading system. It is some setup of the indicatiors which is helping to trade. Because with this TSD DS jurik BrainTrading - we have as much freedom as we want and can trade in any way we want. Basicly - it is the...
[Deleted]
Hello i am new to mql programming I want to make an expert advisor using high-low over the 30 previous times and make an average of their difference. Any help?
Hi I have a strange problem, that is OnDeinit not run when i delete my indicator from chart. The following code is a example of my indicator : #property strict #property indicator_chart_window int OnInit () { return ( INIT_SUCCEEDED ); } void OnDeinit ( const int reason){ Comment (
Can anyone modify and fix this EA , it doesn't activate SL , kindly fix it so SL can activate/Function well,
Hi! I have an OnTimer() function that calculates a new value for a variable every 5 seconds. This variable (a double) varies from 5.0 to 50.0 (approximately). 1) Is it possible to chart this variable every 5 seconds? If yes, how? 2) Is it possible to chart this variable in a scrolling sub-window (5...
Hello all, So i wanted to make a simple EA, that I can insert into my charts when I want to sell/buy. The StopLoss, in my EA is set at 50Pips, however when I test/trade it is always ~20Pips ...could someone be so kind and check it out? /give me a hint what am I doing wrong? Please check these EAs
Hello all, hope this note finds you great! I need to get the chart history data for multiple symbols in an EA, but I have to open the chart for each symbol at each timeframe manually and scroll the chart to the extent the data is available. I am trying to automate this process such that in MQL, we...
  Help  (3)
Hi, I'm new to MQL4 and am trying to learn.  I need help trying to setup a basic EA.  Keep in mind I am doing this one so I can learn how and not necessarily because it will be profitable.  I want to set up an EA that opens two trades simultaneously, one buy and one sell and as soon as both trades...
The indicator with "Green Arrow" is Osagie Trend Scanner V20 and the indicator with the "White arrow" is Osagie Trend Force v30. I want the indicator with the "Green Arrow" to give me a "Sound" and "Message" alert when it changes color from Blue to Red (Sell now) and from Red to Blue (Buy now)....
I got this EA developed. I am struggling to edit the EA to only focus on the first opened position with a certain magic number. Currently the EA focuses on every opened order with the magic number related to the EA. The EA opens a position for you of a different currency when the currency on the...
I have a profitable strategy . just needed some help. i attachd 5 days high low indicator . Indicator rules  _________________ ALERT INDICATOR S1* S2* S3* R1* R2* R3* 5 DAYS HIGH* 5 DAYS LOW* EVERY 100 PIPS ROUND NUMBER* EXAMPLE     1.2300 151.00 0.7800 THIS PRICES WILL GIVE ALERT ALERT NAMES R1...
How to make code for mql 4 to buy/sell just once time? Because in my ea, it makes open/buy many times in one time.
I have a simple EA. It works as follow:  If there is no open order, It should place one BUY. But it place several Buy at the same time. I dont know why!! void OnTick(){   int a;   int b;   if (NoOpenOrder())       {         if(FirstOrder==Buy)     a= OrderSend("EURUSD.e",0,0.1,MarketInfo("EURUSD.e"...
Salve, ho questo indicatore, da solo che le frecce non escono al momento giusto. Escono solo quando si carica un programma sul grafico. puoi aiutarmi?  Hi, I have this indicator, by itself the arrows do not come out at the right time. They only come out when you load a program on the chart. can you...
Hi, I am trying to create a Fibonacci indicator that once put over a chart it uses the ZigZag to get the 3 consecutives (H,L,H) or (L,H,L) so I can use those values to draw a retracement and extension Levels. Also that once I manually adjust the Fibo Levels it recalculates and updates the buffers. I...