bonjour,
J'utilise graphat pro pour le cac et metatrader pour le forex, sur ce dernier j'ai trouvé ce programme forexofftrend et je voudrais le tranferer sur graphat.
Quelqu'un serait-il capable de faire le transfert
Voici le pgm de metatrader:
Merci d'avance.
//+------------------------------------------------------------------+
//| ForexOFFTrend.mq4 |
//| SilverTrend rewritten by CrazyChart |
//| <a href='/ref.php?uri=http%3A%2F%2Fviac.ru%2F' target="_blank">http://viac.ru/</a> |
//+------------------------------------------------------------------+
#property copyright "SilverTrend rewritten by CrazyChart"
#property link "<a href='/ref.php?uri=http%3A%2F%2Fviac.ru%2F' target="_blank">http://viac.ru/</a> "
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- input parameters
extern int CountBars = 300;
extern int SSP = 7;
extern double Kmin = 1.6;
extern double Kmax = 50.6; //24 21.6 21.6
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
SetIndexStyle(0, DRAW_LINE, 0, 2);
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexStyle(1, DRAW_LINE, 0, 2);
SetIndexBuffer(1, ExtMapBuffer2);
//----
if(CountBars >= Bars)
CountBars = Bars;
SetIndexDrawBegin(0, Bars - CountBars + SSP);
SetIndexDrawBegin(1, Bars - CountBars + SSP);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int i, i2,loopbegin,counted_bars=IndicatorCounted();
double SsMax, SsMin, K, val1, val2, smin, smax, price;
//----
if(Bars <= SSP + 1)
return(0);
//----
if(counted_bars < SSP + 1)
{
for(i = 1; i <= SSP; i++)
ExtMapBuffer1[CountBars-i] = 0.0;
for(i = 1; i <= SSP; i++)
ExtMapBuffer2[CountBars-i] = 0.0;
}
for(i = CountBars - SSP; i >= 0; i--)
{
SsMax = High[Highest(NULL, 0, MODE_HIGH, SSP, i - SSP + 1)];
SsMin = Low[Lowest(NULL, 0, MODE_LOW, SSP, i - SSP + 1)];
smin = SsMin - (SsMax - SsMin)*Kmin / 100;
smax = SsMax - (SsMax - SsMin)*Kmax / 100;
ExtMapBuffer1[i-SSP+6] = smax;
ExtMapBuffer2[i-SSP-1] = smax;
val1 = ExtMapBuffer1[0];
val2 = ExtMapBuffer2[0];
//----
if(val1 > val2)
Comment("ïîêóïêà buy ", val1);
//----
if(val1 < val2)
Comment("ïðîäàæà sell ", val2);
}
//----
return(0);
}
//+-----------------------------------------------------------------
<center><a href='http://images.pro-at.com/forums-bourse/0507/4023_061158.gif' target='_blank' style='display:block; width:600px; border:2px dashed #888; padding:10px'><img src="http://images.pro-at.com/forums-bourse/0507/4023_061158.gif" alt='' width='600' height='450' /><em style='display:block; text-align: right'>Cliquez pour agrandir</em></a></center>
J'utilise graphat pro pour le cac et metatrader pour le forex, sur ce dernier j'ai trouvé ce programme forexofftrend et je voudrais le tranferer sur graphat.
Quelqu'un serait-il capable de faire le transfert
Voici le pgm de metatrader:
Merci d'avance.
//+------------------------------------------------------------------+
//| ForexOFFTrend.mq4 |
//| SilverTrend rewritten by CrazyChart |
//| <a href='/ref.php?uri=http%3A%2F%2Fviac.ru%2F' target="_blank">http://viac.ru/</a> |
//+------------------------------------------------------------------+
#property copyright "SilverTrend rewritten by CrazyChart"
#property link "<a href='/ref.php?uri=http%3A%2F%2Fviac.ru%2F' target="_blank">http://viac.ru/</a> "
#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//---- input parameters
extern int CountBars = 300;
extern int SSP = 7;
extern double Kmin = 1.6;
extern double Kmax = 50.6; //24 21.6 21.6
//---- buffers
double ExtMapBuffer1[];
double ExtMapBuffer2[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
SetIndexStyle(0, DRAW_LINE, 0, 2);
SetIndexBuffer(0, ExtMapBuffer1);
SetIndexStyle(1, DRAW_LINE, 0, 2);
SetIndexBuffer(1, ExtMapBuffer2);
//----
if(CountBars >= Bars)
CountBars = Bars;
SetIndexDrawBegin(0, Bars - CountBars + SSP);
SetIndexDrawBegin(1, Bars - CountBars + SSP);
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custor indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
int i, i2,loopbegin,counted_bars=IndicatorCounted();
double SsMax, SsMin, K, val1, val2, smin, smax, price;
//----
if(Bars <= SSP + 1)
return(0);
//----
if(counted_bars < SSP + 1)
{
for(i = 1; i <= SSP; i++)
ExtMapBuffer1[CountBars-i] = 0.0;
for(i = 1; i <= SSP; i++)
ExtMapBuffer2[CountBars-i] = 0.0;
}
for(i = CountBars - SSP; i >= 0; i--)
{
SsMax = High[Highest(NULL, 0, MODE_HIGH, SSP, i - SSP + 1)];
SsMin = Low[Lowest(NULL, 0, MODE_LOW, SSP, i - SSP + 1)];
smin = SsMin - (SsMax - SsMin)*Kmin / 100;
smax = SsMax - (SsMax - SsMin)*Kmax / 100;
ExtMapBuffer1[i-SSP+6] = smax;
ExtMapBuffer2[i-SSP-1] = smax;
val1 = ExtMapBuffer1[0];
val2 = ExtMapBuffer2[0];
//----
if(val1 > val2)
Comment("ïîêóïêà buy ", val1);
//----
if(val1 < val2)
Comment("ïðîäàæà sell ", val2);
}
//----
return(0);
}
//+-----------------------------------------------------------------
<center><a href='http://images.pro-at.com/forums-bourse/0507/4023_061158.gif' target='_blank' style='display:block; width:600px; border:2px dashed #888; padding:10px'><img src="http://images.pro-at.com/forums-bourse/0507/4023_061158.gif" alt='' width='600' height='450' /><em style='display:block; text-align: right'>Cliquez pour agrandir</em></a></center>
Commentaire