Expert Advisors and Automated Trading - page 3

To post a new topic, please log in or register
Hello there, I have an extremely profitable strategy but I need help coding it. It is a scalping strategy with only one key indicator. I'm trying to constrict the TenkanSen and KijunSen buffers of the ichimoku into the indicator chart window with levels 0-100 as the minimum - maximum levels. Please
Hello, Do you know any tool or software that would allow to analyse a portifolio including several strategy reports, including margin levels? The idea is to understand whether specific margin requirements would not be met by trading several pairs at the same time during a specific period. Thanks
I am looking for a script that will allow me write my account history to an external file. I have found exactly what I need using MQL4, but I need someway to convert it to MQL5 or find a script that allows me to do something similar The MQL4 script is here https://www.mql5.com/en/code/13885 The
Hi, I've written an indicator that works pretty well when I need to trade and want to convert it to an EA. Clearly, the indicator is using the OnCalculate event and the EA the OnTick event.  However, when I convert my indicator to an EA it doesn't work as I the original indicator does and I...
I found a few good "script order" that are helpful but none them had auto-trailing stop, and 0 in stop loss is the price of entry. What up with that. Null does not work. I post this topic in hope that someone guide me or send me to an article on how to create an auto-trailing & set stop loss to
Anyone know an ea that stop other ea from trading & close all current trades after passing a certain price in a chart
Hey, im trying to get the Slope of an iMA in percent. I have read multiple posts here but non of them seem to work or im missing out on something (probably last option) I think it doesnt have to do with my code structure, but my math. Heres my code in the OnTick function: double
Hi CopyTicksRange() with COPY_TICKS_ALL seems to providing the correct bid and ask changes but always has zero for the last and volume members I know there have been trades as I am comparing results with a 1 minute bars which have trades. If I run it with COPY_TICKS_TRADE then it returns zero ticks
Hi all, I want my EA, with strategy tester, to automatically run again after or just before the strategy tester is done. So: run with indicator values, change values after its done or almost done and run it again. I've got the running with indicator part, I also know how to change values I just need
Hi, I'm trying to write a code that can trade 4 currency pairs at a time, but I only want a maximum of 1 position per currency pair open at any given moment. However, I do not know which Function I should be using for such an instruction. I am currently using PositionsTotal()<4 to prevent more than
Hello everyone I am trying to place a pending buy limit when the current price of the tick becomes below the Initial price that the trade started with. Unfortunately i am getting the following error: 2020.07.22 11:22:26.992 2020.07.01 00:00:00 failed modify #2 buy 0.1 XAUUSD sl: 0.000, tp: 0.000 ->
Hi guys, I want to make an EA only trade in certain time ranges? I can't seem to locate any tutorial on timers in the article section.  I'm also confused regarding the time here in MQL5, what time does all our platforms follow? our individual local time, or is there a universal time being used?...
Hi everybody, I'am are very new in mql5, i try to develop a EA but i need get the datetime for last open trade. I have the next code but i get forever "2020-07-22 01:00:00" without work. Thank you, Regards datetime GetLastTradeOpenTime() { uint TotalNumberOfDeals = HistoryDealsTotal (); ulong
Is there any way to find an object's name if you only have it's price value? Specifically, I want to be able to determine if a Horizontal Line exists at a given price, knowing only the price value; and get the name of such a line if one exists. I've racked my brain trying to figure out how to do
Hi - I am looking for an opening range breakout indicator and trading EA for MT4 There are just a few on here in the marketplace with not so good reviews - does anyone know of any others available Thanks
Using IG forex mt4 broker Using paid spider pro, USD/EUR on m15 When I use it on my demo account, it works and trades. When I try to initialize it on live account gives me: 2020.07.21 10:44:32.739 Spider Crazy Pro EURUSD,M15: zero divide in 'Spider Crazy Pro.mq4' (1251,36) Could there be a setting
Hi Guys, Just curious I see brokers has business accounts and not sure what people do with it. Do people run networks of accounts? If so, what do they use to run the mt4/mt5? Do they use vps or some special software to trade accounts without mt4/mt5 etc
trade.Buy( 0.02 , NULL ,PriceInfo[ 1 ].close,PriceInfo[ 1 ].low, 2 *PriceInfo[ 1 ].high-PriceInfo[ 9 ].low, NULL ); How come does this open multiple trades on a candle instead of only on the value of the previous low
if ( PositionsTotal ()> 0 ){ for ( int i= PositionsTotal ()- 1 ; i>= 0 ; i--){ string symbol= PositionGetSymbol (i); if ( _Symbol ==symbol) { ulong Ticket = PositionGetInteger ( POSITION_TICKET ); double sl = PositionGetDouble ( POSITION_SL ); double tp = PositionGetDouble ( POSITION_TP ); double
i'd like to delete a pending order if the price moved 500 points without executing it Here's my attempt CTrade trade; MqlRates pricedata []; ArraySetAsSeries(pricedata,true); int data =CopyRates(Symbol(),Period(),0,550,pricedata); for ( int i = OrdersTotal () - 1 ; i >= 0 ; i-- ) { ulong
Hi, request = { "action": mt5.ORDER_TYPE_CLOSE_BY, "symbol": 'USDEUR', "volume": 2, 'position': 123456, 'position_by':???, # "price": 0.9, "sl":0.9, } } result =
Hello, I've started programming in MQL5 (as hobby so far), once in college and in my first job I programmed heavily in C ++, but it was over 20 years ago :) I have such a issue, probably I have no enough knowledge at yet. After the setup occurs, I place three orders, which let's assume they
I been testing several ts ea but most of the time, they do not move to the trailing start, and I do not know why. Does it conflict with other ea but they do not have ts? The bear minimum of my broker ts is 15 but many ea I used not work move it to the starting. I even take account of the spread in
Hi, quite new to all this but when I try to drag my EA onto a chart, nothing attaches and I get an error "Cannot Load ......." Any help would be appreciated
Hi, I have read this topic https://www.mql5.com/en/articles/690#NVidia that deals with using OPENCL to use gpu for computations , However , it has been written in 2013 , so i guess supported hardware is not up to date, My graphic card is a RTX 2060 , i have downloaded latest drivers but mt5 do not
I have an EA in the market for sale. I want to offer it for rent too. But can't seem to find how to do that. I see other EAs in the market that are offered for sale and for rent as well. How do i achieve that? Does the EA has to pass certain amount of purchases for example for it to allow me to
Hello All, I`m a new member and I`m busy creating an EA, that is able to determine the slope of the EMA in between the opening and the closing of a candle /bar. To do so, I was thinking to just subtract both EMA`s values. After doing some research, I`m wondering if it is even possible, to link a
Thank you in advance for helping me! I'm coding automatic trading system in python. I'd like to get positions and close them automatically. However, mt5.order_send() returns None(not any errors but 'None'!) if request['position'] is input from pd.Series data. When I directly input position id code
What kind of data should I be putting in the trade.buy.volume property? Is this the number of shares I wish to buy? In some of the MT5 code I see values like 0.10 but I don't know what that means. Thank you
Hey guys, I have been a longtime lurker here. I have an EA that trades (open/close/modify) on a demo and real account, but when I try to run a backtest on it ,it gives the following error : Initialization Failed (1). The file is ex4 and i do not have the access to the source code. Does anyone has an