friendly
FRENCH
je paierais jamais pour une chose comme ça et tu sais pourquoi ?
car je fais du trading comme passe temps c'est une passion comme d'autres c'est la lecture ou les jeux etc..
moi je gagnerais jamais assez pour en vivre mais ma grande force et mon avantage sur 99% des tradeurs c'est que je le sais :-)
et pour moi un forum c'est un espace gratuit et je compte sur le partage la solidarité oui je suis naif mais j'y crois encore tout n'est pas encore tout pourri par l'argent en tout cas je l'espere .
moi je gagne peu mais je pert peu et je vais te faire rire mais quand je gagne 20 ou 50 $ je suis HEUREUX tu vois je suis un petit et je le sais mais surtout je suis tres realiste .
donc si on m'aide la aussi je suis heureux car je me dit que j'ai raison de croire que tout n'est pas corompu par l'argent et qu'il y a encore des gens bien ( comme Simon G par exemple )
amicalement
Some people spend many thousands of £ or $ or € on their hobbies . . . .
hello RaptorUK
not me I can not afford :-)
no problem I will try to code it myself . friendly |
friendly
//+------------------------------------------------------------------+ //| XCAP_POLIPREDICT.mq4 | //| Copyright 2012, MetaQuotes Software Corp. | //| http://www.metaquotes.net | //+------------------------------------------------------------------+ #property copyright "Copyright 2012, MetaQuotes Software Corp." #property link "http: //www.metaquotes.net" #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+
IndicatorBuffers(8);double TimeSeries; int Width = 126; int MaxDegree = 5; int ForwardExtension = 10; bool ShowLeadingEdge = False; bool ShowPredictedEdge = FALSE; bool ShowSmoothedTimeSeries = TRUE; color LeadingEdgeColor = Blue; color PredictedEdgeColor = Magenta; color SmoothedTimeSeriesColor = Red; color ExtendedTimeSeriesColor = Yellow; double LeadingEdge; double PredictedEdge; int p, j, Value1, Value2; int DataSize; double Polynomial[]; double Coefficient[]; double SmoothedTimeSeries[]; int init() { //---- indicators DataSize = ((2 * Width + 1) + ForwardExtension);
SetIndexBuffer(0,Polynomial); SetIndexBuffer(1,Coefficient); SetIndexBuffer(2,SmoothedTimeSeries); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { //---- if (ShowLeadingEdge == TRUE || ShowPredictedEdge == TRUE) //or (LastBarOnChart=TRUE and ShowSmoothedTimeSeries=TRUE ) then begin { for (p = 0; p <= MaxDegree; p++) { Coefficient[p] = 0; for (j = -Width; j <= Width; j++) { TimeSeries = (High[Width - j] + Low[Width - j]) / 2; // Print( " TimeSeries = " ,TimeSeries); Coefficient[p] = Coefficient[p] + Polynomial[p * DataSize + Width + j] * TimeSeries; } } for (j = -Width; j <= (Width + ForwardExtension); j++) { SmoothedTimeSeries[Width + j] = 0; for (p = 0; p <= MaxDegree; p++) SmoothedTimeSeries[Width + j] = SmoothedTimeSeries[Width + j] + Coefficient[p] * Polynomial[p * DataSize + Width + j]; LeadingEdge = SmoothedTimeSeries[Width + Width]; PredictedEdge = SmoothedTimeSeries[Width + Width + ForwardExtension]; } Print(" PredictedEdge = ", PredictedEdge); Print(" LeadingEdge = ", LeadingEdge); } //**************************** for (j = -Width; j <= (Width + ForwardExtension); j++) Polynomial[0 * DataSize + Width + j] = 1; if (MaxDegree >= 1) { for (j = -Width; j <= (Width + ForwardExtension); j++) Polynomial[1 * DataSize + Width + j] = j; } if (MaxDegree > 1) { for (p = 1; p == MaxDegree - 1; p++) { // create the polynomial for degree p+1 for (j = -Width; j <= (Width + ForwardExtension); j++) { Value1 = j * (2 * p + 1) / (p + 1); //discrete Legendre polynomial solution Value2 = -(p / (p + 1)) * (2 * Width + 1 + p) * (2 * Width + 1 - p) / 4; //discrete Legendre polynomial solution Polynomial[(p + 1) * DataSize + Width + j] = Value1 * Polynomial[p * DataSize + Width + j] + Value2 * Polynomial[(p - 1) * DataSize + Width + j]; } } } for (p = 0; p <= MaxDegree; p++) { Value1 = MathPow(2, -2 * p) / (2 * p + 1); for (j = -p; j <= p; j++) { Value1 = Value1 * (2 * Width + 1 + j); } if (Value1 > 0) Value1 = 1 / MathSqrt(Value1); //this is the normalization coefficient for (j = -Width; j <= (Width + ForwardExtension); j++) { Polynomial[p * DataSize + Width + j] = Value1 * Polynomial[p * DataSize + Width + j]; } } //*************************** //---- return(0); }
/** Log * send information to OutputDebugString() to be viewed and logged by * SysInternal's DebugView (free download from microsoft) This is ideal for * debugging as an alternative to Print(). The function will take up to 10 * stringa (or numeric) arguments to be concatenated into one debug message. //*/ #import "kernel32.dll" void OutputDebugStringA(string msg); #import void Log(string s1, string s2="", string s3="", string s4="", string s5="", string s6="", string s7="", string s8="", string s9="", string s10=""){ if (IsDllsAllowed()){ string out = WindowExpertName() + ": " + s1 + s2 + s3 + s4 + s5 + s6 + s7 + s8 + s9 + s10; OutputDebugStringA(out); } }
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
friendly