Can someone please give me an example of how to use the MQL5 built-in class TrailingFixedPips ?
I tried the following:
#include <Trade\Trade.mqh>#include <Expert\Expert.mqh>#include <Expert\Trailing\TrailingFixedPips.mqh>input string Expert_Title = "toets8";ulong...
I am developing expert advisor.
But there is an "invalid volume" problem in my coding.
Below is the method I learn and think at mql5 articles.
//+------------------------------------------------------------------+//| Check the correctness of the order...
I'm trying to get a formula to calculate trade lotsizes based on stop loss and a % of the account to risk.
I know this has been asked a million times but I still can't get a formula to work. It will need to calculate the value based on conversion to the account currency...
Ola pessoal estou tendo dificuldades com a leitura de um arquivo TXT, peguei um programa q ja faz isso porem por algum motivo na hora da leitura dos dados a funcao entra em loop infinito. Poderiam me ajudar com o problema ou postar algum codigo exemplo.
segue a baixo o ponto q entra em loop...
Is there a way to calculate the Average number of Pips per tick?
I am new to coding in MQL4.
I would like to check in my code if there is a sudden fast movement against my trade and close it out if true.
Should I use the spread?
Thanks for any assistance.
I just opened a new signal, but leverage on my account was 1:1000. Then I see that signal is not for sale because max. leverage allowed is 1:500. I change the leverage, and signal was still not for sale. So I delete it and change leverage on my account to 1:500 and create the same...
Some of the objects that typically appear in Strategy Tester are not appearing in my live account.
More specifically, the entry arrows do appear but the exit arrows and the lines joining the entry and exit arrows do not appear.
Also, the red dashes that mark the stop loss price and...
I am a amateur trader for 4 years and still trading manuel.
According to my technical system ı need to enter conditional sequentional pending order.
Step-1- First order:Pending buy (dont use limit order) order with SL and TP
Step-2 İf First...
0 error(s), 0 warning(s), compile time: 2485 msec 1 1
Attachement to a chart :
2016.05.26 18:16:13.167 MTea invalid EX5 file (533)
Previous attachement to the same previous chart : successful.
Any idea ?
PS 1 : After check, all EA compiled from...
Hi Every One;
I need to write a code to open trade as the following:
I open the trade by end of the candle so I open sell if the close price more than the open price, and I open Buy if the close price less than the open price.
so if I use the one hour chart , and the last price or the close price...
I'm not sure is it right or wrong? i try on backtest. i think it's strange. for example : if pips loss below -5000 points. i want to set stoploss when rebound again it has to stop at -1000 points. if pips loss below -10000 points. i want to set stoploss when rebound again it has to stop at -2000...
What are the methods to retain a variable value if mt4 was restarted?
i can only think of either
1. storing the information in the comment of an order
2. save the info in a csv file and read it back later
I got a problem with OrderSend.
The order was executed in 150063.782 ms It's too much.
Take a look at the log: (I ommited the account and change the deal number on this log for security reasons..)
OP 0 13:46:06.258 Trades '00000':market sell 1.00 EURUSD
KJ 0 13:48:36...
I read somewhere we can draw trendline in indicator but the information is still very vague for me
Need help to clarify a few things
1. I assume it is true you can draw trendline with mql4. do we use obj_trend for this?
2. is it possible to write an EA whereby...
I have an EA which uses the OnTimer event and works just fine on my accounts with two brokers. However, I have just opened a RoboForex account, and the same EA is not working because the OnTimer event handler is not being hit (added debug code proves it). Has anyone else had this problem or is it...
How is it the best way to create a restriction ? (expert, script)
Assuming that I will be trading (not a robot)
- In the beginning of the day I can choose my limit loss equity and max tolerance.
- If I lost a trade, and my equity is lower than my limit loss, the software don`t allow to open new...
Hi, I need help with to close an order by 2 condition in addition to SL,TP, TS.
int doWhat = _doNothing; double hull_trend_current = iCustom(NULL,0,"StepMA pdf 4_6",PERIOD_CURRENT,"",PdfmaLength,SensivityFactor,ConstantStepSize,PdfmaVariance,PdfmaMean...
I have a mql4 EA so I have the source
Please how to add 1 variable, that, if true, ALL shorts become longs, and all longs, shorts?
So where it would have long, it shorts, and where it would have short, it longs.
We don't touch TP, SL, and other rules.
Thank you for your help!
I need a help:
did anybody tackled this? : MT4 multicurrency backtesting in tester environment:
Im thinking that EA could write comments in .csv about what trading decisions it would do.. while it can really only trade one currency pair in the MT4 Tester...so I can collect account...
i tried linking my demo account with FX Junction on MT4 , on first day it worked well but on next day its giving an error " FX Junction Bridge USDCHFm,H1: Failed to connect, please try again later (error code: 816)" I TRIED TO RE ATTACHED THE ea but no success, i tried to contact the...
Hi, My VPS shows a nice ping with my broker, but sometimes ... there's lag. So I want to be able to check the ping, TERMINAL_PING_LAST do it. But in which circumstances does the terminal ping the server ? Plus, if only when connecting, is it possible to reping it ? Thanks
Hi. I bought my first EA from the Market and was able to install it on 1 PC. I want to activate it again on my other PC and on my VPS. How do I reactivate and re-download the same EA for my other PCs? Thanks for any help. Fiil