MQL4 and MetaTrader 4 - page 225

To post a new topic, please log in or register
Hello.   I have made an Custom Indicator (SwingShow) that is working just fine.   Now i'm trying to make a ExpertAdvisor based on this Custom Indicator.   i have this code OnTick  .... Swing = iCustom(Symbol(),PERIOD_CURRENT,"SwingShow",0,0);  ....    But when i check Swing it does not change, it...
Hi everybody, I'm just a beginner trying to build up very simple EAs. At the moment I'm able to build the just using standard indicators for enter or exit conditions. Actually I'm testing a very stupid EA just for practice where the buy enter rule is something like: if...
noobshow
Hi All, I have a expert which i need to randomize months to trade in it... Example of what i want is this, if Expert trade this month of initialization, it shouldn't trade the next month, and if next month wasn't traded, it should trade this month...   I just want a Pause in trading months of...
I have encountered this problem. Book says TICKVALUE is in deposit currency. However, practice shows some brokers return the value in other currency than the deposit currency. Moreover, I have seen cases where ie. one CFD's TICKVALUE was in deposit currency, while another's was in base currency....
Hello, maybe some1 can help me with this. I'm testing basket trading strategy, which uses scripts for opening the baskets. Everything worked fine with FXpro broker, but today I've tried to test it with different broker (with .ndd extension). I've changed the scripts for example: EURUSD --> EURUSD...
Hello all,      I need to find all the data/functions available from MT4 client terminal as DDE Server that can be used in an excel sheet. The DDE-sample.xls sheet already display 6 data information using the following syntax: = MT4 | Data ! Symbol  Data  =  BID, ASK, LOW, HIGH, TIMESEC and QUOTE...
Hi, i need to move an label object to the current price position but not works... please see the code:   int OnInit(){      if( ObjectFind("MyLabel") == -1)      ObjectCreate(0, "MyLabel", OBJ_LABEL, 0, 0, 0);   return(INIT_SUCCEEDED);}void OnDeinit(const int reason){   if( ObjectFind("MyLabel") >=0...
Hi guys, Investigating the logic of one indicator I noticed that iMAOnArray() function returns different results for the same values depending on whether they are represented as indicator buffer or static array. I created a simple test that calculates Simple MA of 3 values with the period of 3....
How i can to attack the line (orizontal,vertical and point to point) to bar line?   Thanks 
Hi all:   I create a class and want to pass an array of that class as a reference parameter, however, some error shows: "Structure have objects and cannot be copied". The error occurs at the last line of the function "TradeDataBase".  In essence, I want to  create a class to store the history order...
I am sorry to post here, but I am a beginner and I am really stuck. My EA is only 164 lines, so can someone kind please help with me? It can compile without error but it can not run on the backtester of Metatrader4....
The same EA I made can place “OrderModify()” in other brokers, but can’t at 1 broker from the second time of modification.I checked my code and the broker's environment and can confirm no issue in my code.So please note that this topic is to check possible reasons out of code. What are the possible...
  Qualifier (2)
Hi Guys,   I'm writing an EA and I stumbled into a problem for my if statement.   I have:   if(something) && (something2){ }   However it won't let me do this, it comes up with an error for && and then if I put just one &, it comes up with errors in subsequent lines which disappear as soon as I...
Hello, My algorithm search the all available currency pair to open appropriate positions and its computation time is less than 1ms.  I want to execute this algorithm in each millisecond. I set "EventSetMillisecondTimer(1)" as 1 millisecond and logged OnTimer execution times. But it can not be less...
Hi, I did my own indicator and now run into problem. Basically I use multiple buffers -> #property indicator_buffers 6#property indicator_color1 Black  #property indicator_color2 Red   #property indicator_color3 Green #property indicator_color4 Yellowdouble ZScore[];double MAofMA[]; double...
void CloseStack1stLevel1M (){for(int b= OrdersTotal()-1; b >= 0; b--)   {   if(OrderSelect(b,SELECT_BY_POS,MODE_TRADES))     if(OrderMagicNumber() == MagicNumber1M)        if(OrderSymbol() == Symbol())          if(OrderType()==OP_BUY)             if(OrdersTotal() == 0)...
this is the indicator code #property indicator_buffers 2double var_a[];double var_b[];int init(){   SetIndexBuffer(0, var_a);   SetIndexBuffer(1, var_b); return (0);}int start(){double getMainTrend;double getMainTrend2;getMainTrend = iMACD(NULL, Maintrend_TimeFrame, 8, 17, 9, PRICE_CLOSE,...
EA MT4 other currencies under a single order tips how to solve :unknown symbol name GBPCAD for OrderSend function    
Please guys can you help me out on this code. I'm try to build a grid lines indicator but the lines are no drawing, here are the codes : #define  RS_LINES //--- input parameters input double     GridMax=2.0; input double     GridMin=1.0; input double     GridStep=10.0; input color...
Which font is this?   
I have been working on this great custom indicator that detects ranging boxes. In its barest form, it detects double, triple and so on inside bars and then draws a box  around them.  Since the same price action forms all time frames, the code can detect a double inside bar on the hourly chart on a...
Hi, I have one indicator and want know possible increase number of bars in chart? for example current chart show only 3227 bars for TF: H1. is there any solution to load more bars from historical data to chart? Regards,
Like in the iHighest and iLowest where it can scan the last 100 or however much bars you designate, how do i make my EA or Indicator i've made to analyze previous bars as well.  I've seen it done in a pattern recognition indicator where it plots hammers, shooting stars, etc... on previous candles as...
Hellow guys, Could anyone help me coding an EA that does the following; 1- The first trade is to Open Buy trade when price crosses lower Bollinger Band (or) a Sell trade when price crosses the upper Bollinger Band. 2- Setting a TP to 60 pips and the SL to 20 pips ( external variable). 3- Every time...
Hello... Could someone here help me. How do I make the EA in MQL4 for multi currency. Or could someone show the link to make EA in mql4 for multi currency? Thank you.
Hello,  is it possibile change character charts tabs from "weekly" to W1, "daily" to D1, "monthly" to MN?    
How to code to change the background of input parameters?
This is a simple Expert Advisor for trading on EURUSD H1 market. Backtestet result:    Trading rules: Long Entry - wait for a bullish bar with body > 30 pips and Volume > 2.0 * Average volume from last 80 bars. Open long at next bar Open and close at the bar Close.       Short Entry - wait for a...
hello. anyone here using Tradeplatform with visual studio? this is great plugini which allow use mt4 with visual studio debugging. before i try to much of times but i couldn't make it work together with visual studio. anyone can share how to setup and review? thanks
I cannot delete a demo account on mt4 mobile (ipad). Any help? thanks.