I'm trying to convert the amount of money into lotsize to buy or sell.
let's say account balance is: $1000
Lotsize risk percent is: 20
the formula I used below return the value of $20. How do I convert that into lot size?
Here's the code I'm working on. What am I missing?
I found this iFibonacci indicator
Does anyone have any idea on how to use this iFibonacci code in an EA?
Is it possible to call upon iFibonacci like iLow, iHigh, codes in an EA?
Or, is it in development for future release of MT4?
Hello MQL4/5 Community,
I have a C++ Python backround and I am working recently on an MQL4 EA. First thing I realised that there are basicly no containers. No Maps/Vector/Lists... (if I am wrong please correct me)
So I was wondering since everybody will already have created custom containers: Why...
I was writing a simple script which its job is to send market data to external program but I have an issue.
I don't know how to access Last Price, Ask price and Bid price in script
How can I solve this?
I am trying to get the EA Elliot Wave working, but it doesn't go easily.
I found out that the main problem must be in the Rules Functions file, especially this sentence:
//| The WaveRules function...
Hi, let me begin by saying I am from the USA. I backtested the CoreFPS EA, and got great results. I was very happy, no all I had to do was find a good broker. Easy, right? Wrong. None, and I mean NONE of the USA regulated brokers use MT5, which CoreFPS is made for. Is there any way I can buy the EA...
Hi, I wanna write something to a textfile everytime a new pass is done while optimization-process. The question is, how can I recognize a new pass ? Is the Start() or Init()-Function run once at every new pass ? Thanks, Swen
Does anyone know what is the code to calculate the median number between the highest value and lowest value of iBearsPower ?
iBearsPower highest value is: 50
iBearsPower lowest value is: 10
Median value is: (50+10) / 2 = 30
I want to know what the mql4 code for that.
Can anyone tell me if swaps are calculated in when performing a backtest with a EA? I would guess yes with the current swap the is when testing? Just want to double check, thanks! *Please source your info*
I have notice that the MA's crossover does not happen the same time as a stochastic and that the EA I am looking for or going to get created, which would be a better buy or sell signal MA or Stochastic crossover?
Can I base the trade entry on a MA and exit on the Stochastic?
Apologies for the slightly off topic subject here, but was hoping someone on the forum may have experience in HTML coding and be able to help me with an issue I'm having sending mail notifications from my EA.
(I couldn't find an off topic section).
I have an EA that send me email...
Is there any way I can reference a function in the EA from my custom library, since there are multiple functions that are customer related functions so must be in EA, but are called in specific places in my code in library no matter what the job? For instance, I have OnTime function, and inside that...
// Current order
// [#1] [#2] [#4]
for (int pos = 0; pos < OrdersTotal(); ++pos)
// when pos is 0, [#1] is selected.
if (OrderSelect(pos, SELECT_BY_POS) == false)
// (1) long long process... (More than 10 sec)
// canceled or closed order [#1] [#2] and new order [#5] =>...
I use a virtual server, everything has worked great until I sync today and immediately after that it closed partial end on 5 positions. This can not be a coincidence? I have not made any changes in the positions. Why should it be closed or sub-end 5st positions in the 30s when...
I'm trying to create an EA that place a buy order when price is above the 50 days line.
Here's the 'if' condition:
if((iLowest(NULL,1,MODE_LOW,10,0) > iMA(NULL,PERIOD_M1,50,0,MODE_SMA,PRICE_CLOSE,0)))
When I test out that if condition it placed an order at a bar higher then...
My problem is I bought an EA few days ago. I run tests on it, everything was okay it showed the deals then I tried to use it in real time for trading and it doing nothing. Is anyone got any idea what is the problem? I would be so thankful is someone will help me.
Is it possible to have my EA display the date in the format "Monday 7th December 2015" ? Is there an easy way to do it without concatenating lots of extracts from the TimeCurrent()? I've been going round in circles with it, surely there must be a function that displays in this format. Maybe I'm...
Is it possible to code an EA based on an indicator if I only have the .ex4 file of the indicator? I found the indicator on a forum, so its free to use for everyone (the author posted it).
All the best!
HiI am new to mql5 and want to design a strategy that essentially looks for turning points on short term ma's.
The user will select a ma period and a number of ma points to loop through. Ie 5 moving average period for 50 data points
I am not sure how to loop through the moving averqge array and...
Sentence I came across: Trade with virtual orders, sl and tp and put real sl and tp in within 1-2 pips of virtual in case of safety.
I came across this sentence, but i can't understand or visualize what it means.
From my own interpretation, coder point of view:
- Virtual order is referred to a...
I've just realised that the SendMail() function seems to recognise basic HTML coding. I have an EA that emails me alerts when certain events happen. It would be good to have it look a little nicer than just text so I've tried some basic HTML code like the header tag <h1> and it formatted...
I need a simple Expert or Script that can close my trades by a defined time. for Example; my Trading-time is from midnight until lunch then the ea/script should control my tradingtime.
I need something like a "Master" EA/Script that control my trading. He should block if it's not in "my...