a trading strategy based on Elliott Wave Theory - page 276

 
to Yurixx

Спасибо, буду искать. А смысл в том, что бы вывести длительный расчет из эксперта, не мешать ему контролировать текущую ситуацию по открытым ордерам. Но это на случай полной реализации в MT.


Это я понял с самого начала. Но вы ведь все время спрашиваете о запуске скрипта из индикатора. При чем же здесь индикатор ? Я, собственно, об этом спрашивал.


It was just one of the suggestions how to get out of the situation when Expert Advisor won't deal with quotes until it calculates everything in start() and in addition you suggested that the indicator will cancel the calculation when new quotes come. So I am wondering...



There is only one variant of using the indicator at the moment of real trading: from the Expert Advisor. That is, the Expert Advisor accesses the indicator buffers where the results of the next iteration are written after the calculation cycle is completed. This means, first of all, that indicators can be used in the real trade only if the duration of calculation of one iteration is significantly less than the average tick receipt period. Secondly, the use of an external indicator by an Expert Advisor is an inefficient scheme from all sides. And if the indicator passes its calculations somewhere outside, it turns out to be absolutely upside down. :-)

I would like to repeat the main idea of my proposed scheme: to separate calculation and position management in different modules. They are two almost not interlinked processes. And it is impossible to use the indicator in any of them. That is why I have written 2 Expert Advisors or Expert+Script.
 
to Yurixx

I already figured that out, I was just looking at the options, in other words, hope for a simple implementation dies last :o)
 
grasn, are you going to trade on every tick? :-o

I think it's enough to make a decision once per bar...
////////////////////////////// bool newb() { /////////////////////////////// static int knw; if (Time[0]==knw) return(0); knw=Time[0]; return(1); } /////////////////////////////// int start(){ /////////////////////////////// if(!newb()) return; // then code }


 
Grasn, are you going to trade on every tick? :-o<br/ translate="no">
...

I think it's enough to make a decision once per bar...



What does every tick have to do with it? I wrote earlier:


It takes about 10-30 minutes to calculate a simplified model in MathCAD, depending on the length of the channel. It takes from 3 hours to 1.5 weeks to calculate one most probable level the price will reach from current price value in some expected time. The prediction test results are quite good.


"current value", meaning start of calculation, charts at least hours. It's just that the calculation time is quite long.
 
Well, if it's on the clock, it'll take 59 minutes to calculate... before the situation changes... =)

(or am I dumb?)
 
Well, if it's on the clock, it'll take 59 minutes to calculate... before the situation changes... =)<br / translate="no">
(am I dumb?)


While waiting the price may go far enough, the time of effective trade will expire, + during this time calculation of another pair may start (and for sure it will). In other words, it is not possible to organise control of the process in a standard way.
 
Yurixx
I will repeat the basic idea of my proposed scheme: to separate calculation and position management into different modules. These are two almost unrelated processes. And it is impossible to use the indicator in either of them. That is why I have written 2 Expert Advisors or Expert+Script.

It seems to me that this separation of program branches is reasonable. However, in this case, the programming itself becomes a bit more complicated, I suppose.
 
While waiting, the price can go far enough, the effective transaction time will expire.

well, if it counts slower than quotes go, i.e. at the time of the result the transaction is no longer relevant, then there is no point in writing MTS at all....
(it's just like if it takes 80 years to write MTS, there is no point in writing it - you won't use the money, you won't support your children.... in short, you will waste your life on nonsense...)

and if you want to know the current price, there is RefreshRates()


P.S. And it should be limited to one pair per computer.
 
<br / translate="no">well, if it counts slower than quotes, i.e. at the time of the result the transaction is no longer relevant, there is no point in writing MTS at all....


Slower, but if you've read my posts carefully you've probably noticed, just undoubtedly noticed, that the forecast gives out a level that price should theoretically pass from a few hours to weeks.


(just like if it takes 80 years to write an MTS, there is no point in writing it - you won't use the money, you won't support your children....


"Better to lose a day but get there in five minutes".


...in short, you will waste your life on nonsense...


You can spend your life on nonsense without writing MTS
 
Ugh, barely dug up the branch in the archives. Wait a minute, the fun is just beginning. Or rather, the fun is always just beginning. At least there are first excellent results, eloquently burning about the serious progress made - confused in my code under MT. Division by zero where there is no division operation as a class, computed numbers do not correspond to MathCad. And in general, I have a strong suspicion, that this thirty pages of code was written by some dilettante, and not by me, although... my handwriting seems to be mine. In general, the process of generating chaos is gaining momentum (and don't send me to any article for dummies). You might even notice that forex looks more understandable and predictable than the written code. :o))))

to solandr

Going back to Hirst. In search of long-forgotten ideas I dug out in the archive some version of calculation of Hearst index of my own production. The version number is unlikely to tell you anything, at least this number didn't say anything to me. Apparently it is one of the first versions of its calculation after page 30 of this thread. It is not that it always shows everything wrong, sometimes it is even correct. Conceptually, with some assumptions, you could say it's a classic. But I don't deny, that I drank a little more beer than usual when I was inventing it. And here's the code itself (I guess it's all quite understandable without any further explanation):


As you can see, it's nothing special. I remember someone complained that the Hearst's value never falls below 0.3 (in general the classical Hearst for Forex quotes will always be about 1 due to the nature of the signal, and it does not suit me very well). This algorithm has no such problem, it can easily show even zero, and is even aware of negative numbers and numbers greater than one. It can't be helped, that's the price of over-sensitivity. Never mind that.

It has one peculiarity, a strong dependence on sample length. There is a similar dependence on sample length for any algorithm calculating the Hurst index, but this calculation also has a dependence on the structure that falls into the sample. I don't remember which one.

You can see what you get. Arbitrary sample of 500 samples:



Plot of the index from the window length counted from the "current" bar minus the dead zone (minus 100 samples). By the way, note that this version (and still, what does that pancake number mean), is uncluttered, although probably does not have all the merits.


Highlighted a few points, let's take a closer look:
Point 1:
window 205
Indicator: 0.19


Point 2:
window: 322
Indicator: 0.37


Point 3: 343
Indicator 1.2


Point 4: 409
Indicator: 0.93


Point 5: 488
Indicator: 1.6



Evaluation is a philosophy. Try to use it, but carefully, maybe the results will be better or not worse.

to Neotron

Seryoga, where have you disappeared to? How goes it?

PS: ok, if Hirst and this whole topic nobody else is interested (and for nothing), I'll go on coding. Ahhhhhh, screw coding, I'm off for a beer. Bye all.