My super computer broke down and I had to switch my trading temporary to a cheap and old computer. I use the HalfTrend indicator a lot in my charts and it turned out, that it sucked out all power from the computer. The reason is, that it runs constantly and it has some large if codes with some heavy math.
So I found a way to have it running only at the end of the bar. I all ways only trade at the end of the bar anyway. Whatever happens between closes are noise to me.
My first take in solving the problem was to remove the alarm code. It did not help enough. Therefore the normal alar functionality are not included in this version. I will put back some time later.
I attach the indicator and the MQ4 code. So the only difference in this indicator compared to the original is, that it runs at the end of every bar and in between bars it does nothing - and thereby it is not sucking power from the computer.
Programmers be aware!!! If you include this indicator in your robot. Since the indicator is updated at close and if your robot also are updated at close, then you cannot know if the indicator was updated yet. The best is to hold your robots code for 5 seconds to be sure.
By the way - as I have started this trend - if anybody have some good AND WORKING confluence ideas, let's hear about it!
I mark the word WORKING, because ideas should be tried out by your self in stead of letting other people do the work.
So let's have some fine confluence tools and let us have the super robot out of it.
So I found a way to have it running only at the end of the bar. I all ways only trade at the end of the bar anyway. Whatever happens between closes are noise to me.
My first take in solving the problem was to remove the alarm code. It did not help enough. Therefore the normal alar functionality are not included in this version. I will put back some time later.
I attach the indicator and the MQ4 code. So the only difference in this indicator compared to the original is, that it runs at the end of every bar and in between bars it does nothing - and thereby it is not sucking power from the computer.
Programmers be aware!!! If you include this indicator in your robot. Since the indicator is updated at close and if your robot also are updated at close, then you cannot know if the indicator was updated yet. The best is to hold your robots code for 5 seconds to be sure.
By the way - as I have started this trend - if anybody have some good AND WORKING confluence ideas, let's hear about it!
I mark the word WORKING, because ideas should be tried out by your self in stead of letting other people do the work.
So let's have some fine confluence tools and let us have the super robot out of it.
Attached File(s)
HalfTrend-Opt_V1.ex4
17 KB
|
317 downloads
HalfTrend-Opt_V1.mq4
11 KB
|
524 downloads
Read post #1 !! Then read it again 10 more times before you ask.