Range-bound switch? - page 2

 

Faster is of course WHR's variant, as AV's code adds overhead prior to accessing the array.
AV's code has a smaller footprint, and that is a difference.

The reason i am commenting here, is the impossibility to measure execution speed using MT4, as it does some unpredictable actions while executing strategy tester.
I have been doing some testing of my EA for speed optimization, and i couldn't get a reliable measuring, the results varied up to 30%, so i actually relied more on logic than on results while optimizing.

Giving the process high or even real time priority, as written above, sounds like a good idea, however i didn't think of it while i was testing.

Anybody has got some good method for speed measuring? 

 
Roel13: what you mean by "noise"?
Speedtest1 EURUSD,M5: Execution time: 36301ms
Speedtest2 EURUSD,M1: Execution time: 35210ms

36301 /  35210 = 3.1%

 
graziani:

Faster is of course WHR's variant, as AV's code adds overhead prior to accessing the array.
AV's code has a smaller footprint, and that is a difference.

The reason i am commenting here, is the impossibility to measure execution speed using MT4, as it does some unpredictable actions while executing strategy tester.
I have been doing some testing of my EA for speed optimization, and i couldn't get a reliable measuring, the results varied up to 30%, so i actually relied more on logic than on results while optimizing.

Giving the process high or even real time priority, as written above, sounds like a good idea, however i didn't think of it while i was testing.

Anybody has got some good method for speed measuring? 

 

Code profiling. But only on a live chart.
 
unfortunately this doesn't help me, but thanks anyway.
 
The trader may repeat the process of buying at support and selling at resistance many times until the stock breaks out of the channel. The upper boundary of the channel is shown by a trendline that connects the points representing a stock's highs over a given time period. The lower boundary of the channel is identified by connecting the points representing a stock's lows. The downside of this strategy is that when a stock breaks out of the channel, it usually experiences a large price movement in the direction of the breakout. If the breakout direction is not favorable for the trader's position, he or she could lose badly. 

Reason: