예스스탁
예스스탁 답변
2021-05-26 10:06:54
안녕하세요
예스스탁입니다.
input : StartTime(70000),EndTime(55000),Xtime(55500);
var : Tcond(false),entry(0);
var : B1(0),B2(0),BX1(0),BX2(0);
var : S1(0),S2(0),SX1(0),SX2(0);
if sdate != sDate[1] Then
SetStopEndofday(Xtime);
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;
SetStopEndofday(0);
entry = 0;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
B1 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.500;
B2 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.400;
BX1 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.990;
BX2 = DayHigh(1);
S1 = DayHigh(1)+(DayHigh(1)-DayLow(1))*0.382;
S2 = DayHigh(1)+(DayHigh(1)-DayLow(1))*0.500;
SX1 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.236;
SX2 = DayHigh(1);
if Tcond == true Then
{
if (MarketPosition == 0 or (MarketPosition == 1 and MaxEntries == 1)) Then
{
if entry < 5 and L > B1 Then
Buy("b1",AtLimit,B1);
if entry < 5 and L > B2 Then
Buy("b2",AtLimit,B2);
}
if MarketPosition == 1 Then
{
ExitLong("bx1",AtLimit,BX1,"B1");
ExitLong("bx2",AtLimit,BX2,"B2");
}
if (MarketPosition == 0 or (MarketPosition == -1 and MaxEntries == 1)) Then
{
if entry < 5 and H < S1 Then
Sell("S1",AtLimit,S1);
if entry < 5 and H < S2 Then
Sell("b2",AtLimit,S2);
}
if MarketPosition == -1 Then
{
ExitShort("sx1",AtLimit,SX1,"S1");
ExitShort("sx2",AtLimit,SX2,"S2");
}
}
SetStopProfittarget(PriceScale*300,PointStop);
SetStopLoss(PriceScale*50,PointStop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 수식작성
> input : StartTime(70000),EndTime(55000),Xtime(55500);
var : Tcond(false),B1(0),B2(0),X1(0),X2(0),entry(0);
if sdate != sDate[1] Then
SetStopEndofday(Xtime);
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;
SetStopEndofday(0);
entry = 0;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
B1 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.500;
B2 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.400;
X1 = DayLow(1)+(DayHigh(1)-DayLow(1))*0.990;
X2 = DayHigh(1);
if Tcond == true Then
{
if (MarketPosition == 0 or (MarketPosition == 1 and MaxEntries == 1)) Then
{
if entry < 5 and L > B1 Then
Buy("b1",AtLimit,B1);
if entry < 5 and L > B2 Then
Buy("b2",AtLimit,B2);
}
if MarketPosition == 1 Then
{
ExitLong("bx1",AtLimit,X1,"B1");
ExitLong("bx2",AtLimit,X2,"B2");
}
}
SetStopProfittarget(PriceScale*300,PointStop);
SetStopLoss(PriceScale*50,PointStop);
--------------
위 수식어는귀사에서 예전에 만들어 주신 피보나치 buy 진입후 청산에 대한 수식어 입니다.
그래프의 sell 진입후 청산에 대한 수식어도 부탁 드립니다.
전일대비 150% , 138% sell 진입후 123% 청산하는 수식어 입니다