커뮤니티
부탁 드립니다.
2019-01-06 19:26:08
178
글번호 124991
도움주심에 감사 드립니다.
첨부 그림과 같이 부탁 드립니다.
input:수평기준_상(0.002),수평기준_하(-0.002),sig(5);
var1=ma(trix(10),sig);
var2=ma(trix(15),sig);
var3=ma(trix(20),sig);
var4=ma(trix(25),sig);
var5=ma(trix(30),sig);
var51=수평기준_상;
var52=수평기준_하;
var53=0;
if var1>var1[1] then
plot1(var1,"p1_histo",red,def,2);
else
plot1(var1,"p1_histo",black,def,2);
if var2>var2[1] then
plot2(var2,"p2_histo",red,def,0);
else
plot2(var2,"p2_histo",black,def,0);
if var3>var3[1] then
plot3(var3,"p3_histo",red,def,0);
else
plot3(var3,"p3_histo",black,def,0);
if var4>var4[1] then
plot4(var4,"p4_histo",red,def,0);
else
plot4(var4,"p4_histo",black,def,0);
if var5>var5[1] then
plot5(var5,"p5_histo",red,def,0);
else
plot5(var5,"p5_histo",black,def,0);
PlotBaseLine1(var51);
PlotBaseLine2(var52);
PlotBaseLine3(var53);
- 1. system2.PNG (0.09 MB)
답변 1
예스스탁 예스스탁 답변
2019-01-07 10:57:09
안녕하세요
예스스탁입니다.
1
input:수평기준_상(0.002),수평기준_하(-0.002),sig(5),손실틱수(10);
var : T(0);
Var : Summer(False),Year(0);
Year = Floor(sDate / 10000);
Value1 = (10000 * Year) + (100 * 3) + 1;
Value2 = 15 - dayofweek(value1);
value3 = (10000 * Year) + (100 * 11) + 1;
value4 = 8 - dayofweek(value3);
Summer = date > (10000 * Year) + (100 * 3) + value2
And date < (10000 * Year) + (100 * 11) + value4;
if sdate != sdate[1] Then
{
if summer == true then
{
SetStopEndofday(053000);
}
if summer == false and stime == 063000 then
{
SetStopEndofday(063000);
}
}
if Bdate != bdate[1] Then
SetStopEndofday(0);
var1=ma(trix(10),sig);
var2=ma(trix(15),sig);
var3=ma(trix(20),sig);
var4=ma(trix(25),sig);
var5=ma(trix(30),sig);
var51=수평기준_상;
var52=수평기준_하;
var53=0;
if var1>var1[1] then
value1 = 1;
else
value1 = -1;
if var2>var2[1] then
value2 = 1;
else
value2 = -1;
if var3>var3[1] then
value3 = 1;
else
value3 = -1;
if var4>var4[1] then
value4 = 1;
else
value4 = -1;
if var5>var5[1] then
value5 = 1;
else
value5 = -1;
Condition1 = min(value1,value2,value3,value4,value5) > 0;
Condition2 = max(value1,value2,value3,value4,value5) < 0;
if T != -1 and max(var1,var2,var3,var4,var5) < var52 Then
T = -1;
if T != 1 and max(var1,var2,var3,var4,var5) > var51 Then
T = 1;
if T == -1 and Condition1 == true and Condition1[1] == false Then
buy("b");
if MarketPosition == 1 and min(var1,var2,var3,var4,var5) > var51 and Condition2 == true Then
ExitLong("bx");
SetStopLoss(PriceScale*손실틱수,PointStop);
2
input:수평기준_상(0.002),수평기준_하(-0.002),sig(5),손실틱수(10);
var : T(0);
Var : Summer(False),Year(0);
Year = Floor(sDate / 10000);
Value1 = (10000 * Year) + (100 * 3) + 1;
Value2 = 15 - dayofweek(value1);
value3 = (10000 * Year) + (100 * 11) + 1;
value4 = 8 - dayofweek(value3);
Summer = date > (10000 * Year) + (100 * 3) + value2
And date < (10000 * Year) + (100 * 11) + value4;
if sdate != sdate[1] Then
{
if summer == true then
{
SetStopEndofday(053000);
}
if summer == false and stime == 063000 then
{
SetStopEndofday(063000);
}
}
if Bdate != bdate[1] Then
SetStopEndofday(0);
var1=ma(trix(10),sig);
var2=ma(trix(15),sig);
var3=ma(trix(20),sig);
var4=ma(trix(25),sig);
var5=ma(trix(30),sig);
var51=수평기준_상;
var52=수평기준_하;
var53=0;
if var1>var1[1] then
value1 = 1;
else
value1 = -1;
if var2>var2[1] then
value2 = 1;
else
value2 = -1;
if var3>var3[1] then
value3 = 1;
else
value3 = -1;
if var4>var4[1] then
value4 = 1;
else
value4 = -1;
if var5>var5[1] then
value5 = 1;
else
value5 = -1;
Condition1 = min(value1,value2,value3,value4,value5) > 0;
Condition2 = max(value1,value2,value3,value4,value5) < 0;
if T != -1 and max(var1,var2,var3,var4,var5) < var52 Then
T = -1;
if T != 1 and max(var1,var2,var3,var4,var5) > var51 Then
T = 1;
if T == 1 and Condition2 == true and Condition2[1] == false Then
sell("s");
if MarketPosition == -1 and max(var1,var2,var3,var4,var5) < var52 and Condition1 == true Then
ExitShort("sx");
SetStopLoss(PriceScale*손실틱수,PointStop);
즐거운 하루되세요
> yes 님이 쓴 글입니다.
> 제목 : 부탁 드립니다.
> 도움주심에 감사 드립니다.
첨부 그림과 같이 부탁 드립니다.
input:수평기준_상(0.002),수평기준_하(-0.002),sig(5);
var1=ma(trix(10),sig);
var2=ma(trix(15),sig);
var3=ma(trix(20),sig);
var4=ma(trix(25),sig);
var5=ma(trix(30),sig);
var51=수평기준_상;
var52=수평기준_하;
var53=0;
if var1>var1[1] then
plot1(var1,"p1_histo",red,def,2);
else
plot1(var1,"p1_histo",black,def,2);
if var2>var2[1] then
plot2(var2,"p2_histo",red,def,0);
else
plot2(var2,"p2_histo",black,def,0);
if var3>var3[1] then
plot3(var3,"p3_histo",red,def,0);
else
plot3(var3,"p3_histo",black,def,0);
if var4>var4[1] then
plot4(var4,"p4_histo",red,def,0);
else
plot4(var4,"p4_histo",black,def,0);
if var5>var5[1] then
plot5(var5,"p5_histo",red,def,0);
else
plot5(var5,"p5_histo",black,def,0);
PlotBaseLine1(var51);
PlotBaseLine2(var52);
PlotBaseLine3(var53);