カラオケの鉄板ソング

https://forex-station.com/attach/file/3339462
Fractals – adjustable period extended2というフラクタルのインジケーターがあります。

これは、フラクタルの横からサイン表示でラインのように引くインジケーターですが、
これをサイン表示でなく、横棒のラインで表示させたいです。

サイン表示でも■とかでやるとラインのように見えますが、
チャートを拡大したとき、途中に間ができて見づらかったりします。

そのため、フラクタルから横にラインで表示させるようにしたいです。
それは、コードのどこかを変えたりしてできますでしょうか?

よろしくお願いいたします。

↓は、「Fractals – adjustable period extended2」のコードです。

//+------------------------------------------------------------------+
//| Fractals - adjustable period |
//+------------------------------------------------------------------+
#property link "www.forex-tsd.com"
#property copyright "www.forex-tsd.com"

#property indicator_chart_window
#property indicator_buffers 2
#property indicator_color1 Red
#property indicator_color2 Blue
//#property indicator_width1 2
//#property indicator_width2 2

//
//
//
//
//

extern int FractalPeriod = 60;
extern double UpperArrowDisplacement = 0.0;
extern double LowerArrowDisplacement = 0.0;

extern int SizeArrow = 2;//銕褞
extern int SimvolArrow= 158;//粨・33-255

double UpperBuffer[];
double LowerBuffer[];

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//
bool alertR, alertG;
int init()
{
if (MathMod(FractalPeriod,2)==0)
FractalPeriod = FractalPeriod+1;
SetIndexBuffer(0,UpperBuffer); SetIndexStyle(0,DRAW_ARROW,EMPTY,SizeArrow); SetIndexArrow(0,SimvolArrow);
SetIndexBuffer(1,LowerBuffer); SetIndexStyle(1,DRAW_ARROW,EMPTY,SizeArrow); SetIndexArrow(1,SimvolArrow);
IndicatorDigits(Digits);
return(0);
}
int deinit() { return(0); }

//+------------------------------------------------------------------+
//| |
//+------------------------------------------------------------------+
//
//
//
//
//

int start()
{
int half = FractalPeriod/2;
int i,limit,counted_bars=IndicatorCounted();

//if(counted_bars<0) return(-1);
//if(counted_bars>0) counted_bars--;
limit=MathMin(MathMax(Bars-counted_bars,FractalPeriod),Bars-1);

//
//
//
//
//

for(i=limit; i>=0; i--)
{
bool found = true;
double compareTo = High[i];
for (int k=1;k<=half;k++)
{
if ((i+k)<Bars && High[i+k]> compareTo) { found=false; break; }
if ((i-k)>=0 && High[i-k]>=compareTo) { found=false; break; }
}
if (found)
UpperBuffer[i]=High[i]+iATR(NULL,0,20,i)*UpperArrowDisplacement;
else UpperBuffer[i]=UpperBuffer[i+1];

//
//
//
//
//

found = true;
compareTo = Low[i];
for (k=1;k<=half;k++)
{
if ((i+k)<Bars && Low[i+k]< compareTo) { found=false; break; }
if ((i-k)>=0 && Low[i-k]<=compareTo) { found=false; break; }
}
if (found)
LowerBuffer[i]=Low[i]-iATR(NULL,0,20,i)*LowerArrowDisplacement;
else LowerBuffer[i]=LowerBuffer[i+1];
}
// if(NewBar())
{ string message = StringConcatenate("Fractals-adjustable" +"(", Symbol(), ", ", Period(), ")" ,"-" ,TimeToStr(TimeLocal(),TIME_SECONDS));

if((NormalizeDouble(LowerBuffer[0] - LowerBuffer[1], Digits) != 0
|| NormalizeDouble(UpperBuffer[0] - UpperBuffer[1], Digits) != 0) && NewBar())
Alert(message);

}
return(0);
}

bool NewBar()
{
static datetime lastbar = 0;
datetime curbar = Time[0];
if(lastbar != curbar)
{
lastbar = curbar;
return (true);
}
else return(false);
}//******************************************************************|

  • 画像を添付する (ファイルサイズ:10MB以内、ファイル形式:JPG/GIF/PNG)
  • 今の自分の気分スタンプを選ぼう!
あと4000文字

お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!

このQ&Aを見た人はこんなQ&Aも見ています


このQ&Aを見た人がよく見るQ&A