Expert Advisors and Automated Trading - page 125

Hello there, I did a very simple expert based on my personal trading strategy . Basically, I wait the indicators confluence and open a position following the trend, as you can see below. There are four EMA (8,20,50 and 200), Vwap, ADX(14), RSI(14) and Volumes. When all of them shows me what market
Hi all, I'm writing a CSV filewrite feature in my EA to basically track my equity curve as well as other data. This code works but everything is printed in one cell, rather than a different column for each parameter - any ideas? if (new_bar( PERIOD_M5 )) { string csv_name = "Infinity
Hellow, I hope somebody can help me :) I am storing a counter value in a variable. Each tick the value gets checked. For each time the value of the variable changes I want to perform a function. For example : variable = 0 variable changes to 1 > call to perform the function (one time) variable
In my EA I need to know how much money will I spend if I buy 1lot of current symbol. -- Pawel
Hello, I'm having issue with my time filter izit doesn't take trade on all instances evene if my setup show up within the specified time range on strategy tester while testing but if I increase the time session it might now pick up the trade
Hey all, I have written the following code to check if there is an open order with a matching symbol and magic number within my multi-symbol EA, but it does not prevent multiple orders from opening. The OpenTradeOrderTicket is a global array that is meant to store a 1 or 0 depending on whether there
Hi guys! I have developed an EA, with HFT strategy type, and the signals are working well, tested in scripts and single run, but when I am trying to do optimization, the results are coming as 0 trades in forex symbols and index symbols are working well . Does anyone have any idea? PS: I'm
hellow, Probably this is a newbie question but here we go. I regardless the discussion whether this is a good idea or not, what I want to do is the following as below : Instead of a stoploss, once my long or short order is triggered I want to set a sellstop (in case the long order is triggered) or a
Hello, I would like to understand how the TP works... If I open a request to open a trade like this: request = { "action" : mt5. TRADE_ACTION_DEAL , "symbol" : "GOLDmicro" , "volume" : 0.1 , "type" : mt5. ORDER_TYPE_BUY , "price" : mt5.symbol_info_tick(
Hello everyone, I want to link a trial account to my trial account on the MT5 platform, but I am not getting any response from the platform. It does not give an error, but it does not connect. My English is not good. I couldn't search the forum. I am sad. please someone help
I am trying to backtest an expert advisor and limit the number of pending orders to 1. However, when I place an order using the CTrade class, OrdersTotal() is still returning 0. I found this forum post but to no avail. Here's the function I'm running and the output: void Buy() { double sl = iOpen
Let's say I have 50$ to spend on single position. It is 1/100 of my account - this is my strategy (EA). How can I calculate size of position in lots based on FIAT? I'd like to use the same EA for different markets - I don't want to hardcode position size
When tested to be traded why? Compiled Many times Changed the location return Comment out traded method Delete .mq5 file The result does not change //+------------------------------------------------------------------+ //| FXModel_exp.mq5 | //|
I'm having trouble getting subplots to appear for expert advisors. I only have this problem while testing on live data - when backtesting on historical data everything works fine. Is there a setting that disables subplots from showing? I am a relatively new user, so maybe I'm missing something here
Hi friends, what's the proper way to have a persistent SQL connection during Optimizer passes? I tried opening, writing to and closing the database after each pass using MQL5 native commands but it didn't work. It did work when using the EA normally. Thank you for your comments
I declare arrays open,high, low and close and use copyopen to copyclose to get details of previous candles. I dont declare ontick() but use OnTimer() with a timer value same as timeframe of chart. this helps me get these details of any number of previous candles. Now suppose i am working in 15m with
Hi, I'd like to know if there's any service that can connect to Telegram/Discord APIs to read signals in channels? And then forward those signals to the broker/exchange/MT4/MT5 API to open trades? If not, does anyone here knows how to code that and will be willing to work on it? I'm looking for a
Hi, I ask the more experienced a doubt since I have not been involved in MQL4 programming for long. Up to now I have used Alpari data at 90% for backtests, but seeing that everyone recommends doing them at 99% (Since I understood, the difference is considerable) I tried to download the data from the
Say I have a long position of 0.01 which I want to reverse hence I sell 0.02. I sent the an opposite order with the position ID so as to have the reversed position also to have the same ID. I get invalid volume error. How do I rectify this error? Can I retain the same position ID ticket for the
This is what I have for using iFractals but I'm not able to comment the values of them properly as per the chart. I don't think I understand how to use those % symbols to get the values that I'm looking for. The following gives me some random values that doesn't reflect as per the indicator from the
Ussually, It happens several times, that once a forward simulation has been carried out, when you press "Start simulation" from forward window, the terminal hangs. do you know how to fix it
Hey, I'm having a issue on a ATR indicator. Even though the codes don't have any problem when compiling, it doesn't plot on the screen. I think there is a thing that I didn't get on PlotIndexes. I also checked the datas of arrays(ind_buffer1, ind_buffer2) and nothing is wrong, the data is correct
Which is considered the best VPS for metatrader? A reliable one that will rarely crash so you can feel confident about leaving an EA running 24/7 and not worry about constantly checking if the server went down, the OS crashed, etc... Thanks in advance PS: I don´ t know if it is allowed to post links
hello friends, can anyone help me to make an EA with a single moving average indicator? keep making TP/SL based on percentage
Hello friends How I get 99.9% modelling quality on MT4 build 950 ???
Just to tell a not so grave bug i have had for a while now : in the tester, when optimizing some parameters of an EA, dots results are being plotted on a window, the bug is : if you close some window in the background, the current window stops displaying dots results. Even the optimization
How To Make EA Trade Only Once A Day , Please Help Me If My EA Open Trading Method Execution Is Correct And I Want It To Only Execute Once In That Day And Not Allow My EA To Open Other Trades And Not Fixed Time To Open Trades Of The Day Can Someone Tell Me How I Should Do It , Thanks A Lot
I want someone to help get asimple free code for mt5 with trailing stop ..actvate after profet with stop & step...and with stoploss and take profet ...thank you in advance
I have been trying to program various strategies and have been able to figure out how various timeframes react with various strategies. Some of these are particularly good with metals which I can't figure out why. so any ideas on this situation? Also since I trade forex only, I notice than randomly