수고하십니다
하다보니 자꾸 막히는 부분들이 생기네요
input : len1(60),Len2(120);
var : SRC(0);
SRC = C;
var1 = WMA(2*WMA(src,len1/2)-WMA(src,len1),floor(sqrt(len1)));
var2 = WMA(2*WMA(src,len2/2)-WMA(src,len2),floor(sqrt(len2)));
if MarketPosition == 0 and
CountIf(Var2>Var2[1],2) == 2 and
NextBarOpen <= var1-PriceScale*5 Then
Buy("b",AtStop,NextBarOpen+PriceScale*5);
SetStopProfittarget(PriceScale*100,PointStop);
SetStopLoss(PriceScale*50,PointStop);
이부분에 대해서 시스템운영시간을 설정하고 싶습니다
예를들어
금일 오전 10시부터~명일 오전 3시까지~~~~
시스템 종료되는 시간에는 모든 계약을 청산하는조건 입니다
부탁드립니다~~~
답변 2
예스스탁
예스스탁 답변
2021-09-02 13:35:50
안녕하세요
예스스탁입니다.
input : len1(60),Len2(120);
input : StartTime(100000),EndTime(030000);
var : Tcond(false);
var : SRC(0);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
Tcond = true;
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
SRC = C;
var1 = WMA(2*WMA(src,len1/2)-WMA(src,len1),floor(sqrt(len1)));
var2 = WMA(2*WMA(src,len2/2)-WMA(src,len2),floor(sqrt(len2)));
if Tcond == true Then
{
if MarketPosition == 0 and
CountIf(Var2>Var2[1],2) == 2 and
NextBarOpen <= var1-PriceScale*5 Then
Buy("b",AtStop,NextBarOpen+PriceScale*5);
}
SetStopProfittarget(PriceScale*100,PointStop);
SetStopLoss(PriceScale*50,PointStop);
즐거운 하루되세요
> 인내로다 님이 쓴 글입니다.
> 제목 : 수식이 궁금합니다
> 수고하십니다
하다보니 자꾸 막히는 부분들이 생기네요
input : len1(60),Len2(120);
var : SRC(0);
SRC = C;
var1 = WMA(2*WMA(src,len1/2)-WMA(src,len1),floor(sqrt(len1)));
var2 = WMA(2*WMA(src,len2/2)-WMA(src,len2),floor(sqrt(len2)));
if MarketPosition == 0 and
CountIf(Var2>Var2[1],2) == 2 and
NextBarOpen <= var1-PriceScale*5 Then
Buy("b",AtStop,NextBarOpen+PriceScale*5);
SetStopProfittarget(PriceScale*100,PointStop);
SetStopLoss(PriceScale*50,PointStop);
이부분에 대해서 시스템운영시간을 설정하고 싶습니다
예를들어
금일 오전 10시부터~명일 오전 3시까지~~~~
시스템 종료되는 시간에는 모든 계약을 청산하는조건 입니다
부탁드립니다~~~
> 예스스탁 님이 쓴 글입니다.
> 제목 : Re : 수식이 궁금합니다
>
안녕하세요
예스스탁입니다.
input : len1(60),Len2(120);
input : StartTime(100000),EndTime(030000);
var : Tcond(false);
var : SRC(0);
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
Tcond = true;
IF Endtime > starttime Then
SetStopEndofday(Endtime);
Else
{
if sDate != sDate[1] Then
SetStopEndofday(Endtime);
}
if (sdate != sdate[1] and stime >= StartTime) or
(sdate == sdate[1] and stime >= StartTime and stime[1] < StartTime) Then
{
IF Endtime <= starttime Then
{
SetStopEndofday(0);
}
}
SRC = C;
var1 = WMA(2*WMA(src,len1/2)-WMA(src,len1),floor(sqrt(len1)));
var2 = WMA(2*WMA(src,len2/2)-WMA(src,len2),floor(sqrt(len2)));
if Tcond == true Then
{
if MarketPosition == 0 and
CountIf(Var2>Var2[1],2) == 2 and
NextBarOpen <= var1-PriceScale*5 Then
Buy("b",AtStop,NextBarOpen+PriceScale*5);
}
SetStopProfittarget(PriceScale*100,PointStop);
SetStopLoss(PriceScale*50,PointStop);
즐거운 하루되세요
> 인내로다 님이 쓴 글입니다.
> 제목 : 수식이 궁금합니다
> 수고하십니다
하다보니 자꾸 막히는 부분들이 생기네요
input : len1(60),Len2(120);
var : SRC(0);
SRC = C;
var1 = WMA(2*WMA(src,len1/2)-WMA(src,len1),floor(sqrt(len1)));
var2 = WMA(2*WMA(src,len2/2)-WMA(src,len2),floor(sqrt(len2)));
if MarketPosition == 0 and
CountIf(Var2>Var2[1],2) == 2 and
NextBarOpen <= var1-PriceScale*5 Then
Buy("b",AtStop,NextBarOpen+PriceScale*5);
SetStopProfittarget(PriceScale*100,PointStop);
SetStopLoss(PriceScale*50,PointStop);
이부분에 대해서 시스템운영시간을 설정하고 싶습니다
예를들어
금일 오전 10시부터~명일 오전 3시까지~~~~
시스템 종료되는 시간에는 모든 계약을 청산하는조건 입니다
부탁드립니다~~~
항상 감사합니다~~~~