Expert Advisors and Automated Trading - page 83

To post a new topic, please log in or register
How I set the mode of my EA calculate margin? What´s the code and where I put it (OnTick, OnInit...)? I need to configure my EA in SYMBOL_CALC_MODE_EXCH_STOCKS (SYMBOL_CALC_MODE), but I can´t program this...  Someone can help me?
Hi  I need help in creating custom indicators or scripts to assist my manual trading. Design custom alert programs based on standard custom indicators. entries based on price action and 2 indicators (rsi and the 60, 21 and 8 ema;,...system must be entirely semi auto i.e custom indicators and scripts...
hi  any one know where i can found the how to make compliance the product for the market. i mean if i post the product for mt4 . the moderator said 130 error. so i want to know is there any link for comliance or guide for post a product on mql5 market. i searched but did not found any thing .
Hello! I have several forex robots with the source code, and I would like to merge them into one EA.  Is there an easy way to do that? thanks!
Hi,    Is there an EA which closes manually traded open positions when a 1hr  or 4 hr candle closes above or below a specific mentioned price Example : I have a buy in euro @ 1.18922, and i want this order to close when the 1Hr candle closes below 1.1860  Can anyone help me 
Hi Traders & Coders, I am wondering how can i Combine an Indicator with Expert advisor? Thanks
NTHD
Hi all, I had a Breakout idea, I create an EA using a 3d Party Software because I don't know anything about coding, the EA working good without any error, back testing on MT5 was great, I did also a MT4 EA and I bought a Tick data software and I tested the EA on MT4 but the result was very very very...
i have oscillator i want to convert it into EA buy at second candle when yellow cross red line and vice versa
How can I get History Profit in MQL5 ? This is  MT4 code... Have any example ? Thank you. double Profit()  {   double pp;   for(int i=OrdersHistoryTotal()-1; i>=0; i--)     {      if(OrderSelect(i,SELECT_BY_POS,MODE_HISTORY)==true )        {         if(OrderSymbol()==Symbol() &&...
  mql errors (1)
help me about what these errors mean 1. error 3 (invalid trade parameters) 2.error 138 (requote) 3.error 4108 (invalid ticket)
  Better NN EA (112   1 2 3 4 5 ... 11 12)
Hi Better has really good EA and is winning the championship Participants - Automated Trading Championship 2007 Profile Better - Automated Trading Championship 2007 What is NN ? Where are the NN threads in this forum? Can anyone here make this EA El cid
Hello, i have code a EA for MT5 which show me good backtests and i dont know if such EAs only can work in backtest or also in live market. I always hear and read from other people that they say scalping EAs just work in backtest and thats why i dont know if it brings somethink to continue testing...
For MT5, if possible, send me, please. Thanks.
 How many OnTick() call after 1 minute ? 1 Min .eq. ? Tick? [Average]
guimf
Hello,  How could I return the average value of x periods from volume indicator? I tried to use the code below, but it is not working properly also. input ENUM_TIMEFRAMES VOL_TF=PERIOD_M30;input ENUM_APPLIED_VOLUME VOL_TYPE=VOLUME_REAL;double vol_filter()   {    double volumes = iVolumes(_Symbol...
Hello..   I want make Candlestick EA in one file mql5. no dass library..  So I want convert Candlestick Indicator to Expert Advisor..but have problem with OnCalculate.. OnCalculate only for indicator..For Expert Advisor only ontick.. For EA this not able to use this OnCalculate...
  Indicator (3)
I'm returning INIT_FAILED in a indicator OnInit function, but it's created anyway. If a EA tries to load it it get a valid handle and can't identify that's not working properly. I also tried to force an error, but it get loaded anyway. // Option 1int OnInit()  {    return INIT_FAILED;  }// Option...
NTHD
Hi all, before, I had a MT4 ea and a friend gave me this easy code if(AccountNumber()!=123456){return(0);} to lock the ea to my account, but now I have a MT5 ea, I tried the code but didn't work, I found this https://www.mql5.com/en/articles/359 but also didn't work. I hope if someone has an easy...
Hello Folks, I would like to ask you some tips for a MQL5 variable (for EA), which must return the amount of seconds elapsed from the beginning of the minute of the specified time. It is essentially what TimeSeconds() is in mql4... could you please help me to define somethign equivalent in MQL5?...
Hello, is there a possibility to scale a chart programmatically? Often the values of my indicator are outside of the visible area of the chart (above or below). It would help a lot if i could set the upper/lower price of the chart area. Thank you in advance.
What is the option for optimized compile in mq4? for example -O2  what is the best way to fast run expert?
How to access account number and broker server address in EA? for example : account number : 15632547 broker address  FXCM-ECN1
Hi, I have an EA which is using a file from dir: MetaQuotes\Terminal\FE0E65DDB0B7B40DE125080872C34D61\MQL5\Files During debuging it is working perfectly, but when it comes to testing, the file had to be placed in: MetaQuotes\Tester\FE0E65DDB0B7B40DE125080872C34D61\Agent-127.0.0.1-3000\MQL5\Files As...
How import/load and unload a dll in expert(EA). If you have a source code or example please upload.
I make a EA to learn how pending operations works. This EA create a buyLimit and a buyStop simultaneous.  When I run the code, both operations are triggered (by log) but the operations tab is pending and the log price values are wrong (the Market price was upper 3150, but the log shows prices around...
Hello Can someone show me how to write 1 line if /else statements? For example I have this  statement with A and B being two variables.   if (A==0) B=0;else B=A+10; How can you make it into 1 line? Thank you
Hi, I wan't to code a custom alert. Alerting me when the prises rise or drops X pips within Y minutes. Then send me an alert on sms or mail or sound in Meta trader. I need some guiding to acomplish this. Any one that has some ideas or input? Br Morten
The SYMBOL_BID and SYMBOL_ASK are always returning zero. Did I something wrong? #include <Trade\Trade.mqh>#include <Trade\SymbolInfo.mqh>#include <Trade\AccountInfo.mqh>CTrade trade;CSymbolInfo symbolInfo;CAccountInfo accInfo;int OnInit(){   if(!symbolInfo...
Hello guys, Could somebody to create an EA in order to delete pending orders at specificied price range by volume ? For example i have 200 sell stops on EURUSD from 1,1800 to 1,17885, 100 of them with 0,01, 50 with 0,02 and 50 with 0,06 volume, so i need for instance to delete 25 pendings with 0,01...
I often get Error 4753 although it does not seem to impact on trade operation or testing. After some research on this forum and wider, I haven't really found any answers that applied to my problem, so I did some experimenting. It seems to me that if PositionSelect(symbol) returns false, it ALSO...