MQL4 and MetaTrader 4 - page 269

So for my strategy I want to close half of the open position when it hits a TP1 value and then I want the remaining order to be modified so that the new stop loss is set at the open price . The code below is what I have, but I'm not sure how to make it work using the OrderSelect and OrderModify
I have been using the MT4 MACD visually and manually to trade MACD and trigger line crosses. Visually the MT4 MACD histogram and red line cross at similar to typical MACD crossing lines. However, the MT4 does not provide any code to make use of the 3 element MACD for crosses which I was unaware of
Hi, The prices I am seeing in the Order window do not match the chart data. Does anyone know the reason for this? Thanks
Hi coder,... Hope all is well I have made an indicator that uses buffers to display arrow up and down,.. Having complex code around 1200 lines The problem is that when the indicator loaded to the chart and new data comes from server, and conditions meets on some candle for the up arrow,.. The arrow
I am working on an EA that has some success, but also has failures during volatility. For example: if 5M MACD down to sell. However, volatility and candles are actually going up quickly. So we get multiple selling and s/l's hit because 5M MACD is delayed with the move and isn't actually up but is
Hello guys. I have to change my PC and, as you can read in the title of the post, I would like to avoid the stressing job of reset every single chart and EAs of my new MT4. It is possible to transfer the whole MT4 on another brand new MT4?
if ( ( iOpen ( NULL ,Timeframe, 1 ) <= SMAS1 && iClose ( NULL ,Timeframe, 1 ) > (SMAS1 + gap) && ( iHigh ( NULL ,Timeframe, 1 ) - SMAS1) < ATR && iHigh ( NULL ,Timeframe, 0 ) > ( iHigh ( NULL ,Timeframe, 1 ) + gap) ) ||
Hello, I try to read the data from the 100pips Momentum_1 .4 indicator, but I get very large numbers for each candlestick. double BuyBuffer= iCustom ( NULL , 0 , "100pips Momentum_1.4" , 1 , 15 , "" , false , false , false , "" , 4 ,i); Thanks for an answer
I was running this EA on demo for testing. See the image showing a Buy signal and when the 1M and 5M MACD crosses down it was suppose to close trade but it didn't. I don't see why but the code seems ok to me. Thanks //+------------------------------------------------------------------+ //|
Hello, please help Please give me some advice on what I should do about this... zcolor = ObjectGet( "prev-LR-Trend" , OBJPROP_COLOR ); if (zcolor== clrDarkBlue ){zBias= 3 ;} else if (zcolor== clrDarkGreen ){zBias= 2 ;} ...so, I'm creating an object ( a OBJ_STDDEVCHANNEL) over
Hello. I'm looking for these indicators : Profit Taker 7 MM Trend Momentum LTF Price Action HTF Price Action Which are for MT4. I have already searched online but could not find these exact one's. Thanks for your assistance
Hi, Ok so I have an issue with my EA that I use as a screener / setup alerter. Here’s how it works: I set it up on any chart, M5 TF, and it scans through a predefined number of pairs (which corresponds to my watchlist). For each pair, in the example I give it gives the low of the last couple of
[Deleted]
Hi, Ive been trying to convert indicator logic to a function but it seems not to work and I get repainting issues. Please see the code attached and let me know where I've gone wrong because this doesnt make sense to me. Attachments are original code and include containing the function. Original
  >> Pivot range <<  (35   1 2 3 4)
the pivot range's simple but effective , pivot = ( high + low + close ) / 3 , the range two lines are calculated like that, range = ( high - low ) / 2 , 1st line ( above the pivot ) = pivot + range , 2nd line ( below the pivot ) = pivot - range , at the next chart i draw all the lines manualy cause...
Hi Guys How do you change the font size and font face in a ListView object? It looks like there are no methods to do that and it seems like a fairly basic requirement. Regards Steve
  EMA Cross EA  (3)
Hello, I got this trading strategy from a friend who trades equities. Looks like I am getting good results so far. The strategy is pretty simple: Components: 4EMA, 10EMA, 50SMA BUY: 4EMA crosses up 10EMA and both are above 50SMA - StopLoss=Lowest point in last 5 bars - TrailStop=20 - TakeProfit=60...
Hi everyone, I've created EA that using ichimoku indi as a condition to open order. In the EA I've created 2 magic number to open a STRONG or WEAK open position. The problem of this EA is when the indicator indicates there's a WEAK open position and start to open position every tick like the ss I've
  TMA&Cycles  (172   1 2 3 4 5 ... 17 18)
Hi, As mentioned in another section ,the intention of this thread is to explain how to use centered Triangular moving averages to gain an edge in the decision making process prior to entering or exiting a trade. Let`s start by the simplest and most important point...How to decide the Half length of
HI I would like to be able to toggle some/all of the indicators on and off when viewing the chart, is this possible ? Thanks N
Hi I'm in the early leaning stages of coding, can anyone help me modify the break even code. The EA opens trades on a new bar open, but I would like the break even stop loss to move when the tick reaches the correct point not when the new bar opens. Any help would be great. Thanks if (BreakEvenAt> 0
  Undeclared identifier  (21   1 2 3)
Hi Can any one help i can't seem to clear the Error:- 'symbols'-undeclared identifier in the line double ask = MarketInfo(symbols,MODE_ASK); input int OpenTradeTime= 0015 ; input double Lots= 0.01 ; input string TradeComment= "D1Long" ; input int MagicNumber= 200 ; input int
  Recurring horizontal levels  (13   1 2)
Hi These days I have discovered the Murrey Math indicator (very good, by the way). Although it has helped me a lot, what I'm really looking for is an indicator of recurring levels: basically what it does is draw a horizontal line where it crosses the largest number of candles, the more candles it
Hi guys, I'm trying to identify 5-candle fractal sweeps as part of my EA but I'm just getting on the strategy tester - any ideas? void OnTick () { static bool findSwing = true ; static bool findSweep = false ; static double swingPrice; static string swingTime; static string sweepTime;
Hi guys, i want to make my EA expire after a certain period of time, can someone please help with the code (im new to coding) I tried using the code below, int start() { string expire_date = “2020.08.31”; // datetime e_d = StrToTime(expire_date); if (CurTime() >= e_d) { Alert (“The trial version has
  Simple experts  (263   1 2 3 4 5 ... 26 27)
This thread will be used to post simple expert advisors ________________ The experts that are going to be posted here are not going to be complete trading systems - after all, building a trading system is much, much harder than the majority of traders want to admit it - but to post code for simply...
I calculate a certain value with the code as shown below. The problem is that the value in the Journal and that on the indicator representing this differs completely - which causes my EA to not work correctly. I take the Williams Percent Range (WPR) indicator and feed that into a Moving Average -
Happy New Year to everyone! I want to turn off auto-trading from within my mql4 ea when a target equity is reached. I know there is a mql4 function to do this but I can not find it. I tried searching with no success. I would appreciate if someone can tell me where I find some documentation or...
Hello Members, I have accidentaly opened a .ex4 file with a regular EDITOR and now all the files everywhere, are not .ex4 files they are editor files now. I want to change it back right away. I have attached a picture of how it doe look right now. Please I need your help out there! Thank you a lot
  S/L & T/P values  (1)
Hi There, I am new to MT4. When we open a new order and enter values of S/L , is there any chance we can see if stop loss triggered, what will be total loss. Like on other trading platform when you enter values of stop loss, simultaneously the pane shows total loss in USD or GBP or any currency you
Hi all coders, I need some help to with an issue I have when loading a dashboard. I have modified a dashboard to display the status of the trend for multiple symbols and time frames. The trend is defined by price to MA and MACD to MACD Signal line. However the IMACD only calculates the values based