Thank you, fxtr51.
Can you show me how to locate the rectangles?
@ m.m.m Thank you very much, thats very nice When i switch the timeframes the ea still crashes, is it possible to fix that in the code?