Random Flow Theory and FOREX - page 7

 
lna01:
It must be hard to find someone who hasn't sculpted such a function for themselves. I did too :) 'Functions'.
You know everything, you know how to do it all (MathCad, MQL, FFT and y(x) have already done it). May be you may build ACF in MQL, I need analog of what I did in MathCad. Or I didn't ask what drink at this time of day or night you prefer? :-)
 

Neutron

I must be doing something wrong, when you run the script in the log gives this 2007.11.13 17:43:28 Script 'FAK' is an indicator and will not be executed
and nothing is drawn.

 
Prival:

Neutron

I must be doing something wrong, when you run the script in the log gives this 2007.11.13 17:43:28 Script 'FAK' is an indicator and will not be executed
and nothing is drawn.


Let's try it this way:

Files:
fak.zip  1 kb
 

I got something if I use it as an indicator, but if I put the script in the folder, it doesn't output anything.

 
Prival:
You know everything, you know how to do everything (MathCad, MQL, FFT and y(x) have already done it). May be you can also build ACF in MQL, I need analog of what I did in MathCad. Or I didn't ask what kind of drink you prefer at this time of day or night? :-)
No, I didn't say anything about MathCad :). I use Mathlab when I need it. But you've confused me with linear regression - what for? In general it's easier for me to correct your code :)
 
Prival:

I got something if I use it as an indicator, but if I put it in the script folder, it doesn't output anything.

I forgot to say that this is the indicator.

And here is the correlation coefficient between adjacent differences (price increments) built for different Timeframes (TF). In other words, this is the first column from the previous script built for different TFs (1 min - first column, 2 min - second column. ... n minutes - third column). It works on minute bars.

//+------------------------------------------------------------------+
//| FAK TF.mq4 |
//| Copyright © 2007, Neutron |
//+------------------------------------------------------------------+
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 Red
#property indicator_width1 4

extern int Nbars=5000, n=50;
int i,step,start,TF;
double s1,s2,fak[1000],Dif0,Dif1;

int start()
{
Start=Nbars+n;

for (TF=1;TF<=n;TF++){
s1=0;s2=0;
for (i=Nbars;i>=0;i--) {
Dif0=Open[i]-Open[i+TF];
Dif1=Open[i+TF]-Open[i+2*TF];
s1=s1+Dif0*Dif1;s2=s2+Dif0*Dif0;}
fak[TF]=s1/s2; }
}

int init()
{
SetIndexStyle(0,DRAW_HISTOGRAM);
SetIndexBuffer(0,fak);
return(0);
}

This is a pure Markov process. If we multiply it by volatility we get a function of TS return on TF.

 
SK. писал (а):
vaa20003:
Put a SellStop. I put a trailing stop of 15 pips. The price went down, the order opened and the price went down another 100 pips, turned around and went up 180 pips. Order should have closed at 85 pips, but it closed at SL.
I used to think that with pending orders no TS was placed, but it worked from time to time.

I still think TS on pending orders does not work in principle. I guess you are wrong in your reasoning.

I thought so too. I checked it out. It works, then it doesn't work :)
That's a completely different story. Let's not clog up the thread.
 

This indicator displays returns (pips/transaction) for the TS exploiting the Markov process (dependence of direction and amplitude of the future bar on the current bar) as a function of the TF. It works on minutes.

If in the code the line

SetIndexBuffer(0,Profit); replace with

SetIndexBuffer(0,Vol); the instrument volatility values in points will be shown as a function of the TF.

Files:
 
Mathemat:

Yurixx, did you solve it or not? Show me a picture, eh? Here would be nice to see an oscillator that oscillates almost strictly between -100 and +100, and the inputs/outputs/turns are strictly at points outside that area...


I think it is impossible to solve it in general case. But I solved it in one particular case. I obtained the trend indicator. But the second line of this indicator - the trend strength - has not been normalized yet. I have some ideas, but they are still too raw.

The picture here is 'Method of Tendential Planimetry' and you've seen it, by the way.

 
Yura, I replied to you.
Reason: