MQL4 and MetaTrader 4 - page 230

Hi All, I am looking for some code (or Function) that will Calculate, in my Expert Advisor (MQL4), regardless of which currency I am looking at, the Current Profit on on All open trades. For example: Curr1 = 500 Curr2 = 250 Curr3 = -250 Comment ( Net_Profit on Open Trades = $500 ); Many Thanks
I'm running MT4 (Mac desktop version) at Forex.com. I have nothing in the Signal, Market, or News tabs. What am I doing wrong? https://www.screencast.com/t/wDspEEzYQMlW TIA! Chop
Hi everyone, I need some help please to finish this EA. I am struggling to basically modify a pending order (SL and TP) only once at the next open bar. //+------------------------------------------------------------------+ //| Simple strategy.mq4 | //|
Hi there, really could use some help here. My code is pretty simple, I drag the EA onto a chart template and it get's the values from a Fibonacci indicator on the template. The problem is when I call the ChartSetSymbolPeriod method when iterating between periods or symbols I either get object data
Hi, I am trying to print Buy and Sell arrow depending on the nature of crossover but this code is printing both the arrows on chart after crossover while depending on the condition it should print one of them. if (shift== true ) { if ( OPEN > CLOSE ) { BufferBuy[pos] =
Dear all, Is there any EA for testing the quality of automatic (EA) execution of deals on broker's account? Are there any standard methodology with set of metrics (like execution time, slippage, number of failed orders, etc), benchmarks that would let to do an adequate comparison over a range of...
Somebody was asking for Fibonacci Indicators in MT4 section. These are the indicators I wrote for MT3 for my own use. These are very simple and easy to convert for MT4, if somebody needs them on MT4 platform. Thet will work on only 1 hour or less than 1 hour timeframe chart.
Hi everybody, I am using scaling in a strategy entering one trade per candle if other conditions are met using: *** The issue I am facing is that I want all SL and TP of all positions on the chart from the same EA to be modifying together as the SL & TP are following a certain indicator on the
hi guys i want to code an EA that when open a Buy/Sell position with 60 point profit. if the position goes to -20 point profit then open a position In the opposite direction of first position with 60 point profit the code is hear: if (orderType==OP_BUY) ticket = OrderSend ( Symbol
  If else error  (4)
Hi I built a test code but suprisingly it wont work the code is : void OnStart () { double test = 0; if ( double == 1) { Alert "yes" ; } else{ Alert "no" ; } } I keep getting this error '==' - unexpected token cl.mq4 17 17 'yes' - open parenthesis expected
Hey everyone, I wanted to create a function for risk management as seen in the code below. double OptimalLotSize( double maxRiskPercentage, double ATR_Lot_Multiplier) { double accEquity = AccountEquity(); double lotSize = MarketInfo( _Symbol ,MODE_LOTSIZE); double tickValue = MarketInfo(
Is it possible to copy a trade from one VPS to another, both mine and both using the MT4 VPS Cheers, Simon
Hello this is my first post. I've been passively reading these forums for 3 month now.... :) But this problem I just can't fix alone and it drives me insane ... ^^ My Expert Advisor should set Trailingstops according to calculated Fibonachi levels. However it seems that the trailing stop is only...
void modifyAllBuyOrdTP(){ if(CountTradesBuy()>=2){ for(int l_pos_4 = OrdersTotal() - 1; l_pos_4 >= 0; l_pos_4--) { OrderSelect(l_pos_4, SELECT_BY_TICKET); if(OrderSymbol() != Symbol() || OrderMagicNumber() != MagicNumber) continue; if(OrderTakeProfit() == findTpL_BuyOrd()) continue;
Hello. Here is my code. it passed the compile but freeze in MT4. Could anyone please help. Sorry for my bad English. I'm not a native speaker. Thank you very much. if (((OrderType()==OP_BUY) && (signal == "sell" )) || ((OrderType() == OP_SELL) && (signal == "buy" ))) {
if (OrderType()==OP_BUYLIMIT ||OrderType()==OP_SELLLIMIT || OrderType()==OP_BUYSTOP||OrderType()==OP_SELLSTOP) { if (!OrderDelete(OrderTicket(),Blue)) ErrorDescription( GetLastError ()); } The code above executes orderdelete when there is a pending order type, although what i'm only trying
Hi I have a Consecutive win count function which is capped at 10. I have just realised that it doesn't stop counting at zero - so i get minus numbers. If there is a win i want to increment by one upto 10, and decrement by 1 down to zero. This is the original code below - i have tried adding breaks /
[Deleted]
Hello, In MT4 strategy tester , what is current spread? Is it referring to spread as of now (the time I am do the testing) or the spread info in the tick data (if there is)
bool once= 0 ; double z[]; void OnTick () { //--- if (!once) { int j = 0 ; for ( int i= 0 ; i< 100 && j< 5 ; i++) { double y = iCustom ( Symbol (), PERIOD_CURRENT , "ZigZag" , 12 , 5 , 3 , 0 , i); if
  Bad formulation  (2)
Good morning all I have a problem with my code, I have checked my code and everything seems to be good .. but my code is not working as I want it to .. and I think maybe it is the code line at the bottom .. I think that's it: if (candle_Low1 <candle_Low2) my code : void OnTick () { if
[Deleted]
Hi, I'd like to create a simple script which can close an order already opened for some time (i.e 1200 seconds / 20 minutes), not depending on the fact that the trade is yet profitable. Best would be just before the end of a time period, just before the new one starts. Should I look for a solution...
Hi everyone. Hope you are doing great. I'm here to find out that if there is any way to display the indicators that are being used in EA on the chart through the same EA? If its possible then please feel free to share any references or anything helpful. Thanks in advance
Hi Gurus, I need MT4 EA that can check any open trade having no TP after every 5-10 mins and set TP for X pips automatically on all pairs. Please advise. Regards
I'm using MT4 1320 (2020/12/11) and i backtest my EA with 10 years of historical data downloaded and imported with QuantDataManager. I'm used to test with Control Points and I'm facing a very strage situation. I've not found any solution on the forum or elsewhere on the web... When i start
Hi, can I open the same MT4 account on 2 VPS, to be able to run an EA on each account instance? Cheers
[Deleted]
Function IsTradeAllowed now accepts two parameters. Undocumented. Does anybody know the meaning of the two params?
i've been trying to get custom indicator (zigzag) value using this code...and get its signal #define PATH "ZigZag" void OnTick () { //--- double ask= SymbolInfoDouble ( Symbol (), SYMBOL_ASK ); double bid= SymbolInfoDouble ( Symbol (), SYMBOL_BID ); double zigzag_handler= iCustom (
Hi from time to time, when switching account I am encountering a bug using latest MT4 build 1320, MarketInfo(Symbol(),MODE_MARGINREQUIRED) is returning -92233720368547760 ( = - 0x 147ae 147ae 147b0 ) GetLastError() returns 0 ( no error ), so this negative 0x 147ae147ae147b0 value is not supposed
  EX4 to mql4  (9)
Hello  i hope any one help me in this problem  i have expert EX4 i want to decompiler it and get the code mql4  if there any protection tool  to used it with ex4 to add licence code and account number or expairy date 
HI, I have a few indicators that I set a Global trigger to eg TriggerHit=Sell. What I am trying to do is count the candles after the trigger so that I can reset the Trigger to=Null. I have looked at iBarShift, I also need to have it run the routine only once per candle/tick. nBars= iBarShift (