You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
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.
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:
I got something if I use it as an indicator, but if I put the script in the folder, it doesn't output anything.
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? :-)
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.
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.
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.
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.