예스스탁
예스스탁 답변
2020-04-02 13:46:05
안녕하세요
예스스탁입니다.
1
input : 익절틱수(50),손절틱수(20);
var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
If MarketPosition == 0 and crossup(value1,value2) Then
{
if entry == 0 or (entry > 1 and countif(crossup(value1,value2) or CrossDown(value1,value2),BarsSinceExit(1)) >= 6) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or (entry > 1 and countif(crossup(value1,value2) or CrossDown(value1,value2),BarsSinceExit(1)) >= 6) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2
input : 익절틱수(50),손절틱수(20);
var : Xcond(false);
var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
if TotalTrades > TotalTrades[1] Then
{
if IsExitName("StopLoss",1) == true then
Xcond = true;
Else
Xcond = false;
}
If crossup(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == -1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true
and countif(crossup(value1,value2) or CrossDown(value1,value2),BarsSinceExit(1)) >= 6) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == 1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true
and countif(crossup(value1,value2) or CrossDown(value1,value2),BarsSinceExit(1)) >= 6) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
3
input : 익절틱수(50),손절틱수(20);
var : S1(0),D1(0),TM(0),TF(0);
var : Xcond(false),entry(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
entry = 0;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
If MarketPosition == 0 and crossup(value1,value2) Then
{
if entry == 0 or (entry >= 1 and TM >= TM[BarsSinceExit(1)]+50) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or (entry >= 1 and TM >= TM[BarsSinceExit(1)]+50) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
4
input : 익절틱수(50),손절틱수(20);
var : S1(0),D1(0),TM(0),TF(0);
var : Xcond(false),entry(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
entry = 0;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
if TotalTrades > TotalTrades[1] Then
{
if IsExitName("StopLoss",1) == true then
Xcond = true;
Else
Xcond = false;
}
If crossup(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == -1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and TM >= TM[BarsSinceExit(1)]+50) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == 1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and TM >= TM[BarsSinceExit(1)]+50) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
5
input : 익절틱수(50),손절틱수(20);
var : S1(0),D1(0),TM(0),TF(0);
var : Xcond(false),entry(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
entry = 0;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
If MarketPosition == 0 and crossup(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and ExitTime(1) >= 180000) or
(entry >= 1 and ExitTime(1) >= 70000 and ExitTime(1) < 180000 and TM >= TM[BarsSinceExit(1)]+50) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and ExitTime(1) >= 180000) or
(entry >= 1 and ExitTime(1) >= 70000 and ExitTime(1) < 180000 and TM >= TM[BarsSinceExit(1)]+50) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
6
input : 익절틱수(50),손절틱수(20);
var : S1(0),D1(0),TM(0),TF(0);
var : Xcond(false),entry(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
entry = 0;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
if TotalTrades > TotalTrades[1] Then
{
if IsExitName("StopLoss",1) == true then
Xcond = true;
Else
Xcond = false;
}
If crossup(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == -1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and (ExitTime(1) >= 180000 or ExitTime(1) < 70000) ) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and ExitTime(1) >= 70000 and ExitTime(1) < 180000 and TM >= TM[BarsSinceExit(1)]+50) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == 1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and (ExitTime(1) >= 180000 or ExitTime(1) < 70000)) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and ExitTime(1) >= 70000 and ExitTime(1) < 180000 and TM >= TM[BarsSinceExit(1)]+50) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
7
input : 익절틱수(50),손절틱수(20);
var : S1(0),D1(0),TM(0),TF(0);
var : Xcond(false),entry(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
entry = 0;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
If MarketPosition == 0 and crossup(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and ExitTime(1) >= 70000 and ExitTime(1) < 180000) or
(entry >= 1 and (ExitTime(1) >= 180000 or ExitTime(1) < 50000) and TM >= TM[BarsSinceExit(1)]+50) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and ExitTime(1) >= 180000) or
(entry >= 1 and ExitTime(1) >= 70000 and ExitTime(1) < 180000 and TM >= TM[BarsSinceExit(1)]+50) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
8
input : 익절틱수(50),손절틱수(20);
var : S1(0),D1(0),TM(0),TF(0);
var : Xcond(false),entry(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
entry = 0;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
}
if MarketPosition != 0 and MarketPosition != MarketPosition[1] Then
entry = entry+1;
value1 = (highest(H,9)+lowest(L,9))/2;
value2 = (highest(H,26)+lowest(L,26))/2;
if TotalTrades > TotalTrades[1] Then
{
if IsExitName("StopLoss",1) == true then
Xcond = true;
Else
Xcond = false;
}
If crossup(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == -1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and ExitTime(1) >= 70000 and ExitTime(1) < 180000) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and (ExitTime(1) >= 180000 or ExitTime(1) < 50000) and TM >= TM[BarsSinceExit(1)]+50) Then
Buy ("b") ;
}
If MarketPosition == 0 and crossdown(value1,value2) Then
{
if entry == 0 or
(entry >= 1 and MarketPosition == 1) or
(entry >= 1 and MarketPosition == 0 and Xcond == false) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and ExitTime(1) >= 70000 and ExitTime(1) < 180000) or
(entry >= 1 and MarketPosition == 0 and Xcond == true and (ExitTime(1) >= 180000 or ExitTime(1) < 50000) and TM >= TM[BarsSinceExit(1)]+50) Then
Sell ("s");
}
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
즐거운 하루되세요
> 이대표 님이 쓴 글입니다.
> 제목 : 시스템 수식부탁
> 일목균형표에서 기준선이 전환선 크로스할때 매수진입, 반대일때는 매도진입
청산은 50틱, 손절은 20틱 이라고 시스템 조건을 줄때
1.청산이후 진입조건이 되더라도 5번 진입조건까지는 무시후 6번째 이후 진입가능
2.손절이후 진입조건이 되더라도 5번 진입조건까지는 무시후 6번째 이후 진입가능
3.청산이후 50분 동안 진입금지
4.손절이후 50분동안 진입금지
5.오전7시부터 오후6시까지 청산이후 50분동안 진입금지
6.오전7시부터 오후 6시까지 손절이후 50분동안 진입금지
7.오후6시부터 익일 오전5시까지 청산이후 50분동안 진입금지
8.오후6시부터 익일 오전5시까지 손절이후 50분동안 진입금지
위와 같은 시스템 수식 8가지 경우의 수로 부탁드립니다
별도로 위 시스템수식을 오후6시부터 익일 오전4시까지는 적용하도록 하는 수식도 부탁드립니다