Forum

horizontal lines based on zigzag keep disappearing

@Vladimir Karputov Alain Verleyen William Roeder I have zigzag based indicator. The code makes sense to me but the objects(HLINE) drawn on screen keep disappearing, please help //+------------------------------------------------------------------+ //|

Help with zigzag EA

Hi, i am writing an ea based on the zigzag indicator. I dont understand what happens here but for some reason, sometimes price is zero and date = 1970 , I do check the buffer if its empty to zero //+------------------------------------------------------------------+ //| searching for candle lows &

zigzag peak date

Hi, I am having trouble getting the zigzag peak date or the date of the candle where the zigzag created a high or low points I have gone through all threads i found talking about the zigzag. This is what I have //+------------------------------------------------------------------+ //| Custom

Zigzag patterns

Im creating an indicator that has to detect chart structure . e.g Rising wedge I do have code I took somewhere online that only places s/r at the peaks. I want to convert the code to take in trendline, so can you please guide me; //+------------------------------------------------------------------+

Getting open and close time gives wrong value

I have had this code throughout my eas, scripts ands indicators but suddenly broke and returns wrong values. Then I surfed the forum, there is enough information on this but all the snippets i took also gave the same wrong answer. Is this a bug or Mql5 changed? HistorySelect ( 0 , TimeCurrent ());

How to get the last profit for a certain symbol

I am trying to get the ea to enter on candle open if previous trade on a symbol was a loss but my code doesn't if another symbol closes with tp. for example: 2 positions opened, 1 boom 1000 Index and the other Crash 1000. C rash 1000 hits Stop loss and then Boom 1000 hits take profit before

Trail stop stops moving

Let say we have 2 conditions for trailing: Trail with 300000 points at a defined signal. Else trail 100000 points if previous trade was a loss using martingale. We have 2 Open Positions at 0.2 lots on diff pairs (Boom1000 and Boom500 and Boom500 hits Sl. On candle open, Boom500 a position with 0.4

Magic Number

I have an issue with my ea. If I attach 2 Eas on one chart it gets confused and does its own thing. I want a way that the ea detects that it has been attached on a particular chart and increases the magic number because I dont want to do it manually example: if "boom 1000 Index" has a magic 7897

Trtailing stop doesnt trail on demo but does on the tester

My ea has 2 sets conditions for both buy and sell, uses martingale, Break even and trailing stop. They all work as written on the tester but on the Demo, it doesnt even move. My conditions are: Buy and break even and if previous buy on the next candle open Buy using martingale then trail. For those

Ea opening Trades everytime

Hello, the ea is suppose to open a trade when candle[3] is bearish and 2 candles bullish ( candle [2] & candle[1]) but it opens positions on the first signal till it hit the SL then it looks for another signal. How do I stop this