Need help. I have tried multiple times to modify the EA but can’t seem to get this one strategy rule working. Their are other I add to it but just to get the trade to trigger on this one rule I can’t seem to get it.
If MACD (12,26,9) Histogram is greater than 0 and also MACD (12,26,9) signal line is greater than 0 AND
MACD (12,26,9) Histogram has been greater than MACD (12,26,9) line for a minimum of 4 candles back AND
MACD (12,26,9) Histogram has closed finally below the signal line then initiate a short on next bar open. Below is the latest rule I have but don’t know where im going wrong.
market position is flat
MACD(12,26,9, close, Main)>0
MACD(12,26,9, close, Main)>MACD(12,26,9,close,signal)
MACD(12,26,9,close,main)<MACD(12,26,9,close,signal) (this one is less than to signal the one bar back below histogram)??
THEN: Enter at Market
WHAT AM I DOING WRONG WITH THIS STRATEGY, ITS NOT OPENING A POSITION AT NEW BAR
I have also attached strategy if anyone can edit or explain problem. Thanks
I have attached the strategy. Also I am trying to only use 1 trade per candle but its not working either. Could you please look at it and edit it or let me know what I am doing wrong. Your help in editing would be greatly appreciated as I have been trying to get this 1 trade per candle under control but I just can’t seem to get it right.
I have also attached a 2nd file just with trades per candle just for testing as well and its not working. I tried building per the forums I read and also my and your direct communication and its still trading multiple times per candle.Attachments in this forum are visible only for registered users.Attachments in this forum are visible only for registered users.
I checked the strategy, there were several problems:
1. in your first rule you use OR but don’t use any brackets
2. you use Bid crosses below EMA, do you really mean that?
3. in your description you specified:
but in the strategy I see:
so, I;m not sure which one you want to use.
Your strategy doesn’t open any trades in my backtest, because the trade rules are never true.
This means that you specified a combination of conditions that are never true.
It is difficult to find out which condition causes this exactly. The easiest thing to do is to start with very simple strategy and just one condition, and make sure it takes some trades.
Then add more conditions and always backtest it to make sure it does what you wanted.
I’m sending a corrected strategy, but it still doesn’t take trades for me.Attachments in this forum are visible only for registered users.
Ok, I think I can work out more of the rules once I get the trades per candle issue down.
But once again, I can’t get the only 1 trade per candle thing down. The attached strategy is a very simple:
Go short when:
EMA(10) < EMA(20)
GO long when:
EMA(10) > EMA(20)
But when its trading it will do multiple positions per candle, How to fix this? I also want it to where if I want 2 trades per candle I just input it in their as well and they will start doing 2 trades per candle.. Can you please see whats wrong and where I am messing up?Attachments in this forum are visible only for registered users.
Anything? I have wasted hours upon hours trying to get this but can’t figure it out, now I have disabled all my EA’s and stuck in limbo and just don’t know what to do. I would pay in order for you to phone conference me in order to get this issue fixed for me b/c as of now I am sitting dead in the water with no EA’s running b/c I can’t get them to trade only once per candle.
as I replied to you in another thread, you don’t have logic that would prevent EA opening multiple trades per candle.
The easiest solution is to add IsBarOpen=true condition to your first rule. This will ensure that trend is set to 1 only once when the candle is opened.
When EA opens trade it sets trend=0 and it will remain like that until the next candle.
You must be logged in to reply to this topic.