I have a EA that work son M1 chart for USDJPY. One of the conditions uses Market properties Highest price Candles period to get the highest price for candles 2 to 5. Yet the ea is doing the calculation using candles 3 to 6.
I suspect this is a backtesting issue but keen to know for certain before sending it live.
One option is to use Delay for 1 second but this feature doesn't allow backtesting to work.
Any ideas / suggestions?
Posts made by Tulefi
-
Market properties highest price not working on backtestposted in Questions & Answers
-
RE: Pause for a tickposted in Questions & Answers
The reason for this is that I have a condition that is meant to compare the previous period low price with the low price of the previous 10 periods starting with the previous plus 1 period (candle ID 2). However, in backtesting the EA sometimes is behind and uses the 10 periods back starting with candle ID 3.
-
RE: Moving average help pleaseposted in Questions & Answers
Thanks! Any thoughts on my other post about a brief pause? When backtesting, the EA sometimes does not calculate the MA from candle 2 and back and instead calculates from candle 3 and back. I am concerned when going live that it will do the same. I suspect that I force the EA to wait one tick it will use the correct periods to work out the MA.
-
Moving average help pleaseposted in Questions & Answers
I am a bit confused with the MA indicator. My logic is that I want a condition where :
Previous period close < moving average of Previous +1 period close and going back 10 periods.Should I use the the first shift in the indicator or the candle shift that you access in more settings?
-
Pause for a tickposted in Questions & Answers
I have developed an EA that works on M1 chart but I need it to pause for at least 1 tick after the new M1 period starts before it works through the trade opening conditions. Any suggestions to do this will be much appreciated.
-
Simple calc on close pricesposted in Questions & Answers
I am trying to include a condition where the highest close price - lowest close price of the previous x periods has to be greater than say 10 pips. I can easily ge the highest price - lowest price over the past x periods but I want to base it on close prices. Any help much appreciated.
-
RE: Comment uglyposted in Questions & Answers
@l-andorrà Thank you. Very insightful. If I was using this only for Sells would you still go with No trade before block 3?
-
RE: Comment uglyposted in Questions & Answers
@tulefi l'Andorra - thank you, you truly are an expert! I have adjusted the EA. Is this correct now?
-
RE: Comment uglyposted in Questions & Answers
https://fxdreema.com/shared/dHTvbiZse
It seems that after a trade is opened, the EA stops tracing the channel high and low?
Thank you for checking this for me l'Andorra.
-
Comment uglyposted in Questions & Answers
I need a visual track of the high price for the last 18 periods. I have used the attached but find it keeps on getting stuck and not updating. This usually happens after a trade has closed. Any ideas? What is worrying is that I have this simialr logic in a condition to open a trade and wondering if there is a bug.

-
RE: (on trade (event data) open priceposted in Questions & Answers
@jstap Thank you, much appreciated.
-
RE: (on trade (event data) open priceposted in Questions & Answers
@tulefi Please if anyone knows the answer...
-
RE: (on trade (event data) open priceposted in Questions & Answers

What I am trying to achieve is this for a sell:
IF the trade is more than 800 pips in profit at the end of the previous period, AND the price in the current period increases so the trade is less than 800 pips in profit THEN...
Close trade
Will this work?
-
(on trade (event data) open priceposted in Questions & Answers
If I have a sell trade open, does "on trade event data open price" give me the bid price the trade opened at?
-
RE: Finding low price of a particular periodposted in Questions & Answers
@l-andorrà Thank you, very useful !
-
Finding low price of a particular periodposted in Questions & Answers
I need to be able to reference the low price of the 09:00-10:00 H1 period. How do I do this using timestamp. Should I key in 09:00 or 10:00?
Basically at some point later in the day I have some logic that needs to reference the low price of the 09:00-10:00 period. -
RE: Zero divide on restart due to LotStep being changed to zero . .posted in Bug Reports
@mantadiver I am fairly new to this but we are having issues with zero divide errors. Please see attached. Is your solution related to this?
.
The line of code is to do withe money management where we are calculating lot size related to account balance and SL.
Any help woould be much appreciated. -
Count number of bars using trade open details NOT variablesposted in Questions & Answers
We have found that when MT4 crashes and we have to reload iour EA that variables get reset.
How do we determine the number of bars / candles that have elapsed from trade open candle to now without using variables?