커뮤니티
당일 매도
2019-01-30 09:20:14
153
글번호 125731
* 많은 도움에 고맙습니다.
* 아래 수식을 오늘 09시 매매 시작 하여 다음날 06시 모두 청산 하는 식 좀 부탁 드립니다.
Input : Period(15);
var : S1(0),D1(0),TM(0),TF(0);
var : RSIV(0);
RSIV = RSI(Period);
if Bdate != Bdate[1] Then{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
if CrossDown(RSIV,30) Then{
if MarketPosition == 0 or (MarketPosition == -1 and TM >= TM[BarsSinceEntry]+10) Then
buy();
}
if CrossUp(RSIV,70) Then
{
if MarketPosition == 0 or (MarketPosition == 1 and TM >= TM[BarsSinceEntry]+10) Then
sell();
}
}
SetStopProfittarget(PriceScale*30,PointStop);
SetStopLoss(PriceScale*30,PointStop);
* 고맙습니다. 좋은 시간 되십시요^^
답변 1
예스스탁 예스스탁 답변
2019-01-30 11:28:19
안녕하세요
예스스탁입니다.
Input : Period(15);
var : S1(0),D1(0),TM(0),TF(0);
var : RSIV(0),Tcond(false);
RSIV = RSI(Period);
if (sdate != sdate[1] and stime >= 90000) or
(sdate == sdate[1] and stime >= 90000 and stime[1] < 90000) Then
tcond = true;
if (sdate != sdate[1] and stime >= 60000) or
(sdate == sdate[1] and stime >= 60000 and stime[1] < 60000) Then
tcond = false;
if Bdate != Bdate[1] Then{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
if CrossDown(RSIV,30) and tcond == true Then{
if MarketPosition == 0 or (MarketPosition == -1 and TM >= TM[BarsSinceEntry]+10) Then
buy();
}
if CrossUp(RSIV,70) and tcond == true Then
{
if MarketPosition == 0 or (MarketPosition == 1 and TM >= TM[BarsSinceEntry]+10) Then
sell();
}
}
SetStopProfittarget(PriceScale*30,PointStop);
SetStopLoss(PriceScale*30,PointStop);
if sdate != sdate[1] Then
SetStopEndofday(060000);
if bdate != bdate[1] Then
SetStopEndofday(0);
즐거운 하루되세요
> 요타 님이 쓴 글입니다.
> 제목 : 당일 매도
> * 많은 도움에 고맙습니다.
* 아래 수식을 오늘 09시 매매 시작 하여 다음날 06시 모두 청산 하는 식 좀 부탁 드립니다.
Input : Period(15);
var : S1(0),D1(0),TM(0),TF(0);
var : RSIV(0);
RSIV = RSI(Period);
if Bdate != Bdate[1] Then{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
if CrossDown(RSIV,30) Then{
if MarketPosition == 0 or (MarketPosition == -1 and TM >= TM[BarsSinceEntry]+10) Then
buy();
}
if CrossUp(RSIV,70) Then
{
if MarketPosition == 0 or (MarketPosition == 1 and TM >= TM[BarsSinceEntry]+10) Then
sell();
}
}
SetStopProfittarget(PriceScale*30,PointStop);
SetStopLoss(PriceScale*30,PointStop);
* 고맙습니다. 좋은 시간 되십시요^^
다음글
이전글