EACreator.com Forum

EA Creator - Automate your forex strategies without programming www.EACreator.com


You are not connected. Please login or register

1 trade per candle?

View previous topic View next topic Go down  Message [Page 1 of 1]

1 1 trade per candle? on Fri Oct 12, 2012 11:28 pm

hi, thanks to the admin for answering my last question, and now i have another for you.

i would like to create an EA that only trades with the trend, so im using the good old fashioned EMA's first part easy, the second part is not so.

I would like the EA to open a position at the start of the new candle and then take profit or stop loss, but once it has taken profit or stop lossed i would like it to not open any new positions until the start of the next candle. (so it would only trade once per candle)

i have tried using sleep after trade function but if we are on a 1 hour timeframe and it opened the sell position at the start but it took 25 mins to take profit, we have 35mins left, so i set it to 35 mins sleep, all good for the first trade, 2nd trade took 5mins to hit profit and the sleep is only set for 35 mins and not 55 as would need to be, so in 35 mins time a new trade is opened and from there on the timmings are off and my system is good for nothing?

any help would be very welcome. Smile

View user profile

2 Re: 1 trade per candle? on Fri Oct 12, 2012 11:29 pm

old_forum_question wrote:hi, thanks to the admin for answering my last question, and now i have another for you.

i would like to create an EA that only trades with the trend, so im using the good old fashioned EMA's first part easy, the second part is not so.

I would like the EA to open a position at the start of the new candle and then take profit or stop loss, but once it has taken profit or stop lossed i would like it to not open any new positions until the start of the next candle. (so it would only trade once per candle)

i have tried using sleep after trade function but if we are on a 1 hour timeframe and it opened the sell position at the start but it took 25 mins to take profit, we have 35mins left, so i set it to 35 mins sleep, all good for the first trade, 2nd trade took 5mins to hit profit and the sleep is only set for 35 mins and not 55 as would need to be, so in 35 mins time a new trade is opened and from there on the timmings are off and my system is good for nothing?

any help would be very welcome. Smile

If EA input "WaitNextCandle" is set to true (default value), it should not open new position until the candle of the last signal is finished. However you need to attach EA to the same timeframe as your candles are. Also you should backtest on the same timeframe where your candlesticks are. So if you need EA not to open second trade until hourly candle is finished, you should backtest EA on 1 hour timeframe or attach EA to 1 hour timeframe chart for trading.

View user profile

3 Re: 1 trade per candle? on Fri Oct 12, 2012 11:31 pm

The idea of having one trade per candle would be worth it. You may probably take an increase in the profit that you desired. Allotted to the situation, the EA can also possibly take the concern that was needed.

View user profile

Sponsored content


View previous topic View next topic Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum