커뮤니티
수식검토
2018-06-15 11:55:02
153
글번호 119769
아래는 BUY와 SELL 2가지 수식입니다.
둘 다
진입제한시간만 시뮬레이션이 되지 않습니다.
수식을 검토해주세요.
**************************************************
1) BUY 수식
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
exitlong();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if stime == 진입시간 and var1 > var2 and Tcond == true then
buy();
if MarketPosition == 1 then
{
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절);
ExitLong("bp1",Atlimit,EntryPrice+PriceScale*익절);
ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == 1 and MaxContracts < pyN Then
buy("bb",AtStop,LatestEntryPrice(0)+pyra);
2)sell 수식
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
ExitShort();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if stime == 진입시간 and var1 < var2 and Tcond == true then
sell();
if MarketPosition == -1 then
{
ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절);
ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절);
ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == -1 and MaxContracts < pyN Then
sell("ss",AtStop,LatestEntryPrice(0)-pyra);
답변 2
예스스탁 예스스탁 답변
2018-06-18 09:56:36
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 수식검토
> 아래는 BUY와 SELL 2가지 수식입니다.
둘 다
진입제한시간만 시뮬레이션이 되지 않습니다.
수식을 검토해주세요.
**************************************************
1) BUY 수식
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
exitlong();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if stime == 진입시간 and var1 > var2 and Tcond == true then
buy();
if MarketPosition == 1 then
{
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절);
ExitLong("bp1",Atlimit,EntryPrice+PriceScale*익절);
ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == 1 and MaxContracts < pyN Then
buy("bb",AtStop,LatestEntryPrice(0)+pyra);
2)sell 수식
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
ExitShort();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if stime == 진입시간 and var1 < var2 and Tcond == true then
sell();
if MarketPosition == -1 then
{
ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절);
ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절);
ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == -1 and MaxContracts < pyN Then
sell("ss",AtStop,LatestEntryPrice(0)-pyra);
예스스탁 예스스탁 답변
2018-06-19 10:04:44
안녕하세요
예스스탁입니다.
1
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
exitlong();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if var1 > var2 and Tcond == true then
buy();
if MarketPosition == 1 then
{
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절);
ExitLong("bp1",Atlimit,EntryPrice+PriceScale*익절);
ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == 1 and MaxContracts < pyN Then
buy("bb",AtStop,LatestEntryPrice(0)+pyra);
2
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
ExitShort();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if var1 < var2 and Tcond == true then
sell();
if MarketPosition == -1 then
{
ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절);
ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절);
ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == -1 and MaxContracts < pyN Then
sell("ss",AtStop,LatestEntryPrice(0)-pyra);
즐거운 하루되세요
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 전화주시기 바랍니다.(02-3453-1060)
>
> 목마와숙녀 님이 쓴 글입니다.
> 제목 : 수식검토
> 아래는 BUY와 SELL 2가지 수식입니다.
둘 다
진입제한시간만 시뮬레이션이 되지 않습니다.
수식을 검토해주세요.
**************************************************
1) BUY 수식
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
exitlong();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if stime == 진입시간 and var1 > var2 and Tcond == true then
buy();
if MarketPosition == 1 then
{
ExitLong("bl1",AtStop,EntryPrice-PriceScale*손절);
ExitLong("bp1",Atlimit,EntryPrice+PriceScale*익절);
ExitLong("btr1",AtStop,highest(h,BarsSinceEntry)-PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == 1 and MaxContracts < pyN Then
buy("bb",AtStop,LatestEntryPrice(0)+pyra);
2)sell 수식
input : 진입시간(091500),진입제한시간(121500),트레이드종료시간(151500),pyra(0.05),pyN(1);
input : 손절(100),익절(100),TR(100),최소가격변화포인트(0.5), 봉갯수(50);
var : Tcond(false);
if (sdate != sdate[1] and stime >= 진입시간) or
(sdate == sdate[1] and stime >= 진입시간 and stime[1] < 진입시간) Then
Tcond = true;
if (sdate != sdate[1] and stime >= 진입제한시간) or
(sdate == sdate[1] and stime >= 진입제한시간 and stime[1] < 진입제한시간) Then
Tcond = false;
if (sdate != sdate[1] and stime >= 트레이드종료시간) or
(sdate == sdate[1] and stime >= 트레이드종료시간 and stime[1] < 트레이드종료시간) Then
ExitShort();
if date != date[1] then {
var1 = 0;
var2 = 0;
}
if stime <= 진입시간 then {
if C > O then
var1 = var1 + 1;
else if C < O then
var2 = var2 + 1;
}
if stime == 진입시간 and var1 < var2 and Tcond == true then
sell();
if MarketPosition == -1 then
{
ExitShort("sl1",AtStop,EntryPrice+PriceScale*손절);
ExitShort("sp1",AtLimit,EntryPrice-PriceScale*익절);
ExitShort("str1",AtStop,Lowest(l,BarsSinceEntry)+PriceScale*TR);
}
SetStopInactivity(최소가격변화포인트,봉갯수,PointStop);
if MarketPosition == -1 and MaxContracts < pyN Then
sell("ss",AtStop,LatestEntryPrice(0)-pyra);
다음글
이전글