Strange Timeframe Problem*
-
Hi All,
My EA doesn't open trades on the 15min chart. But if I switch to a 5min or 1hr chart, it opens the trade....!
Any ideas...?
-
Do you use a timeframe selection in some block?
-
Hi Roar,
No. I generally only use the 'Current' timeframe setting....
I've isolated the problem to the MA Cross...I have the cross width set to 40. So the problem is here somewhere...*
The crossover happens within Candles 1-40 so I'm not sure what I'm missing...?
-
I'm not sure the cross width can be used like that...
-
@roar said in Strange Timeframe Problem*:
I'm not sure the cross width can be used like that...
What do you mean....?
If I'm looking for the MA cross within the last 40 candles, how would I set that up...?
Regards*
-
@Morpheus_0 I think "cross width" means that ID 0 must be "above" and exactly ID 40 must be "below", or whatever operator you use.
To get "some candle within 40" you need a loop that goes through IDs 1-40
-
@roar Yes, this option changes the id of the previous candle.
By default the crossover compares 4 values - 2 values from the current candle (or the one you choose) and 2 values from its previous candle. If the current candle is 0, the previous one is 1, and the difference (cross width) is 1.
This functionality is one that I regred adding, and I never found a reason to use it. The problem is that if you are using 40 candles difference, anything could happen inside them. Other crossovers and what not.
-
@Morpheus_0 said in Strange Timeframe Problem*:
If I'm looking for the MA cross within the last 40 candles, how would I set that up...?
There is one fancy block with stupid name "Indicator moves within limits". It's like multiple Condition blocks in one. While the Condition compares 2 values (or 4 when crossover is used), this block checks 2 values... and then 2 from the previous candle... and then 2 from the previous candle... as many candles as you choose.
So you can check for example whether for X candles the MA value was always above Candle Close, or not. But better try it.
-
@fxDreema @roar Thankyou for the help.
I still can't seem to work out how to see if a MA cross occurred within the last 40 candles using the "moves within limits" block because it only shows 1 indicator, not 2 like normal condition block*

EDIT - I think it's because I need to use 'Dynamic Value' instead of 'Fixed Value'...? -
@Morpheus_0
It happened to me a lot until I found that there were errors like array out of range in the journal or EA output terminal window. The reason that your EA not working in some tf or some instrument may simply because there is corruption in history data or not enough data. Have you try re download all historical data and mostly importantly, set a large number in the chat setting so to display enough bars? -
@sktsec - Thanks for the suggestions. The issue is actually trying to find an MA Crossover in the last 40 candles, but I will have a look*