아래는 슈퍼 시그널 채널이라는 지표의 MQL5 수식입니다.
이 수식을 예트 수식으로 변환하고 싶습니다.
본 수식의 사용법에 대한 설명을 아래 링크에 첨부하였습니다.
여러 회원님들 도움 되시기 바랍니다.
부탁 드리겠습니다. 감사합니다.
//+------------------------------------------------------------------+
//| super-signals-channel.mq4 |
//| Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Nick Bilak"
#property link "http://www.forex-tsd.com/"
// hacked into a channel ind. by t_david sometime in early 2007
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_width1 1
#property indicator_color2 Lime
#property indicator_width2 1
#property indicator_color3 Red
#property indicator_width3 1
#property indicator_color4 Lime
#property indicator_width4 1
extern int SignalGap = 4;
extern int ShowBars = 50;
extern int BBPeriod=20;
int dist=24;
int Win = 0,Loss= 0;
double b1[];
double b2[];
double b3[];
double b4[];
int init() {
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1); //
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1); // cross
SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,1); // down arrow
SetIndexStyle(3,DRAW_ARROW,STYLE_SOLID,1); // up arrow
SetIndexBuffer(0,b1);
SetIndexBuffer(1,b2); //
SetIndexBuffer(2,b3); // Down arrow
SetIndexBuffer(3,b4); // Up arrow
SetIndexArrow(2,234); // Down arrow
SetIndexArrow(3,233); // Up arrow
return(0);
}
int start()
{
int hhb,llb, count;
for (count=0;count<500;count++)
{
b1[count]=0; b2[count]=0; b3[count]=0; b4[count]=0;
hhb = iHighest(Symbol(),0,MODE_HIGH,dist,count-dist/2);
llb = iLowest(Symbol(),0,MODE_LOW,dist,count-dist/2);
if ((count==hhb))
{
{
b3[count]= High[hhb]+SignalGap*Point;
if(((Open[count-1])) > ((Close[count-1]))) // GREEN Candlestick
{
Win++;
// Print("SUPER SIGNAL CHANNELWin::",Win);
}
else
{
Loss++;
// Print("SUPER SIGNAL CHANNEL Loss::",Loss);
}
}
}
if (count==llb)
{
{
b4[count]=Low[llb]-SignalGap*Point;
if(((Open[count-1]))< ((Close[count-1]))) // RED Candlestick
{
Win++;
Print("SUPER SIGNAL CHANNEL Win::",Win);
}
else
{
Loss++;
Print("SUPER SIGNAL CHANNEL Loss::",Loss);
}
}
}
b1[count]=High[hhb];//+SignalGap*Point; //draws horiz line for sale (RED)
b2[count]=Low[llb];//-SignalGap*Point; //draws horiz line for buy (GREEN)
}
return(0);
}
답변 1
예스스탁
예스스탁 답변
2022-06-08 15:16:18
안녕하세요
예스스탁입니다.
올려주신 내용은 변환이 가능하지 않습니다.
해당 언어를 사용경험이 없어 내용파악이 어렵습니다.
도움을 드리지 못해 죄송합니다.
즐거운 하루되세요
> 흑수돌 님이 쓴 글입니다.
> 제목 : 수식 문의
> 아래는 슈퍼 시그널 채널이라는 지표의 MQL5 수식입니다.
이 수식을 예트 수식으로 변환하고 싶습니다.
본 수식의 사용법에 대한 설명을 아래 링크에 첨부하였습니다.
여러 회원님들 도움 되시기 바랍니다.
부탁 드리겠습니다. 감사합니다.
//+------------------------------------------------------------------+
//| super-signals-channel.mq4 |
//| Copyright © 2006, Nick Bilak, beluck[AT]gmail.com |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2006, Nick Bilak"
#property link "http://www.forex-tsd.com/"
// hacked into a channel ind. by t_david sometime in early 2007
#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 Red
#property indicator_width1 1
#property indicator_color2 Lime
#property indicator_width2 1
#property indicator_color3 Red
#property indicator_width3 1
#property indicator_color4 Lime
#property indicator_width4 1
extern int SignalGap = 4;
extern int ShowBars = 50;
extern int BBPeriod=20;
int dist=24;
int Win = 0,Loss= 0;
double b1[];
double b2[];
double b3[];
double b4[];
int init() {
SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,1); //
SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,1); // cross
SetIndexStyle(2,DRAW_ARROW,STYLE_SOLID,1); // down arrow
SetIndexStyle(3,DRAW_ARROW,STYLE_SOLID,1); // up arrow
SetIndexBuffer(0,b1);
SetIndexBuffer(1,b2); //
SetIndexBuffer(2,b3); // Down arrow
SetIndexBuffer(3,b4); // Up arrow
SetIndexArrow(2,234); // Down arrow
SetIndexArrow(3,233); // Up arrow
return(0);
}
int start()
{
int hhb,llb, count;
for (count=0;count<500;count++)
{
b1[count]=0; b2[count]=0; b3[count]=0; b4[count]=0;
hhb = iHighest(Symbol(),0,MODE_HIGH,dist,count-dist/2);
llb = iLowest(Symbol(),0,MODE_LOW,dist,count-dist/2);
if ((count==hhb))
{
{
b3[count]= High[hhb]+SignalGap*Point;
if(((Open[count-1])) > ((Close[count-1]))) // GREEN Candlestick
{
Win++;
// Print("SUPER SIGNAL CHANNELWin::",Win);
}
else
{
Loss++;
// Print("SUPER SIGNAL CHANNEL Loss::",Loss);
}
}
}
if (count==llb)
{
{
b4[count]=Low[llb]-SignalGap*Point;
if(((Open[count-1]))< ((Close[count-1]))) // RED Candlestick
{
Win++;
Print("SUPER SIGNAL CHANNEL Win::",Win);
}
else
{
Loss++;
Print("SUPER SIGNAL CHANNEL Loss::",Loss);
}
}
}
b1[count]=High[hhb];//+SignalGap*Point; //draws horiz line for sale (RED)
b2[count]=Low[llb];//-SignalGap*Point; //draws horiz line for buy (GREEN)
}
return(0);
}