답변완료
함수요청
안녕하세요?
아래 글번호 71584번 재질문입니다.
어제의 시세데이터는 금일 신호와 독립적이어야 합니다.
따라서 금일 시세로만 당일의 매매신호를 생성하고 싶습니다
즉 당일 9시 1분 완성봉을 봉카운트 1개로 시작하여 고점 저점을 비교하자합니다.
스크립트 수정 요청드립니다.
감사합니다.
----------------------------------------------------------------------------------------
input : nn(1),mm(2),진입횟수(1);
var : entry(0);
if Bdate != Bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition <= 0 and entry < 진입횟수 and L > H[nn] and L > H[mm] Then
Buy("b",AtMarket);
if MarketPosition >= 0 and entry < 진입횟수 and H < L[nn] and H < L[mm] Then
Sell("s",AtMarket);
if MarketPosition == 1 and C < L[nn] and C < L[mm] Then
ExitLong("bx",AtMarket);
if MarketPosition == -1 and C > H[nn] and C > H[mm] Then
ExitShort("sx",AtMarket);
if MarketPosition != 0 and sTime == 152000 Then
{
ExitLong();
ExitShort();
}
2021-03-24
1291
글번호 147350
시스템
답변완료
문의 드립니다.
안녕하세요!
일전에 알려주신 수식인데요
# 매수진입시
진입가 대비 고점이
1. 100 point 이상 150 point 미만일때 고점대비 70 point 하락하면 바로 청산
2. 150 point 이상 200 point 미만일때 고점대비 80 point 하락하면 바로 청산
3. 200 point 이상 250 point 미만일때 고점대비 90 point 하락하면 바로 청산
4. 고점이 250 point 이상일때는 위에 1~3 적용 않되고 그냥 시스템 조건으로 청산
# 매도 진입시
진입가 대비 저점이
1. 100 point 이상 150 point 미만일때 저점대비 70 point 상승하면 바로 청산
2. 150 point 이상 200 point 미만일때 저점대비 80 point 상승하면 바로 청산
3. 200 point 이상 250 point 미만일때 저점대비 90 point 상승하면 바로 청산
4. 저점이 250 point 이상일때는 위에 1~3 적용 않되고 그냥 시스템 조건으로 청산
var : BH(0),SL(0);
if MarketPosition == 1 Then
{
BH = Highest(H,BarsSinceEntry);
if BH >= EntryPrice+100 and BH < EntryPrice+150 then
ExitLong("bx1",AtStop,BH-70);
if BH >= EntryPrice+150 and BH < EntryPrice+200 then
ExitLong("bx2",AtStop,BH-80);
if BH >= EntryPrice+200 and BH < EntryPrice+250 then
ExitLong("bx3",AtStop,BH-90);
}
if MarketPosition == -1 Then
{
SL = Lowest(L,BarsSinceEntry);
if SL <= EntryPrice-100 and SL < EntryPrice-150 then
ExitShort("sx1",AtStop,SL+70);
if SL <= EntryPrice-150 and SL < EntryPrice-200 then
ExitShort("sx2",AtStop,SL+80);
if SL <= EntryPrice-200 and SL < EntryPrice-250 then
ExitShort("sx3",AtStop,SL+90);
}
이것을 바로청산이 아니고
종가에서 청산 하는 방식으로 수식 부탁 합니다.
예를 들어
진입가 대비 고점이
1. 100 point 이상 150 point 미만일때 "종가가" 고점대비 70 point 또는 그이상 하락하면 청산
이런식으로 수정 부탁드립니다.
2021-03-24
1112
글번호 147346
시스템
답변완료
부탁드립니다
#,수고많으십니다
아래식의 주기를 뤌간주기로 변경할때 로직 부탁드립니다.
var:s1(0),s2(0),s3(0),t1(0),t2(0),t3(0),t4(0);
s1=DayOpen(0);
s2=DayHigh(0);
s3=DayLow(0);
Plot1(DayOpen(0));
plot2(dayopen()+abs(S2-S1));
plot3(dayopen()-abs(S2-S1));
plot4(dayopen()+abs(S3-S1));
plot5(dayopen()-abs(S3-S1));
Plot6((DayHigh(0)+DayLow(0))/2)
감사합니다
2021-03-24
1173
글번호 147344
지표
답변완료
수식어 부탁드립니다
input : StartTime(070000),EndTime(055000),xtime(055500);
var : 전환선(0),기준선(0),선행스팬1(0),선행스팬2(0);
var : Tcond(false);
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);
}
전환선 = (highest(H,9)+lowest(L,9))/2;
기준선 = (highest(H,26)+lowest(L,26))/2;
선행스팬1 = (전환선[25]+기준선[25])/2;
선행스팬2 = (highest(H,52)[25]+lowest(L,52)[25])/2;
var1 = Disparity(60);
if Tcond == true Then
{
if 전환선 > 기준선 and crossup(전환선,선행스팬1) and var1 >= 99 Then
buy("b");
if MarketPosition == 1 then
{
if 전환선 < 기준선 and CrossDown(전환선,선행스팬2) and var1 >= 99 Then
exitlong();
}
if 전환선 < 기준선 and CrossDown(전환선,선행스팬1) and var1 <= 1000 Then
sell("s");
if MarketPosition == -1 then
{
if 전환선 > 기준선 and CrossUp(전환선,선행스팬2) and var1 <= 1200 Then
ExitShort();
}
}
------------------------------------
상기 수식어의 시간에서 총수익이 120틱이면 매매정지
총손실이 30틱이면 매매정지를 부탁드립니다
2021-03-24
1349
글번호 147343
시스템