답변완료
전략식 합치는거 가능할까요?
같은 엑셀 data를 쓰는 세개의 차트입니다.
너무 공간을 차지하고 예트가 너무 느려지는 요인이 됩니다.ㅜㅜ
시스템 합성 관리자 써보려고했는데 잘 안되네요..
피라미딩은아니고,
차트당 1개씩 진입/청산, 최대 동시 포지션은 3개진입이 되겠네요..
꼭 부탁합니다.
-----------------------------
input : StartTime(90000),EndTime(151000);
Input : shortPeriod(6), longPeriod(50);
input : aaa(-0.40),bbb(0.40);
input : 손절(2.5);
input : 익절(5.0);
input : sellfilter(0.28);
input : buyfilter(-0.55);
var : Tcond(false,Data1);
var : C2(0,Data2);
var : C3(0,Data3);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
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;
C2 = Data2(c);
C3 = Data3(c);
# 매수/매도청산
If data2(c) <= aaa and c3<buyfilter and CrossUP(value1, value2) Then
{
Buy();
}
If data2(c) >= bbb and c3<sellfilter and CrossDown(value1, value2) Then
{
Sell();
}
#
SetStopEndofday(EndTime);
SetStoploss(손절,PointStop);
SetStopProfittarget(익절,PointStop);
-------------------------------------------------------------
input : StartTime(91000),EndTime(150000);
Input : shortPeriod(6), longPeriod(50);
Input : s1(7), s2(24);
input : aaa(-0.40),bbb(0.35);
input : 손절(2.4);
input : 익절(5.4);
input : sellfilter(0.23);
input : buyfilter(-0.45);
var : Tcond(false,Data1);
var : C2(0,Data2);
var : C3(0,Data3);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
Value3 = ma(C2, s1);
Value4 = ma(C2, s2);
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;
C2 = Data2(c);
C3 = Data3(c);
# 매수/매도청산
If data2(c) <= aaa and c3<buyfilter and CrossUP(value3, value4)
and CrossUP(value1, value2) Then
{
Buy();
}
If data2(c) >= bbb and c3<sellfilter and CrossDown(value3, value4)
and CrossDown(value1, value2) Then
{
Sell();
}
#
SetStopEndofday(EndTime);
SetStoploss(손절,PointStop);
SetStopProfittarget(익절,PointStop);
----------------------------------------------------------------------
input : StartTime(91000),EndTime(150000);
Input : shortPeriod(6), longPeriod(50);
Input : s1(7), s2(24);
input : aaa(-0.40),bbb(0.35);
input : 손절(2.4);
input : 익절(5.4);
input : sellfilter(0.23);
input : buyfilter(-0.45);
#
var : Tcond(false,Data1);
var : C2(0,Data2);
var : C3(0,Data3);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
Value3 = ma(C2, s1);
Value4 = ma(C2, s2);
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;
C2 = Data2(c);
C3 = Data3(c);
# 매수/매도청산
If data2(c) <= aaa and c3<buyfilter and CrossUP(value3, value4)
Then
{
Buy();
}
If data2(c) >= bbb and c3<sellfilter and CrossDown(value3, value4)
Then
{
Sell();
}
#
SetStopEndofday(EndTime);
SetStoploss(손절,PointStop);
SetStopProfittarget(익절,PointStop);
2021-03-01
901
글번호 146709
시스템
답변완료
수식부탁드립니다.
안녕하세요
수식 좀 부탁드립니다
다음과같은 수식을 예스언어로 바꾸어 사용하고싶습니다..
01.
Input : shortPeriod(12), longPeriod(26);
Var : value(0),BuyCond(FALSE), SellCond(FALSE);
value = MACD(shortPeriod, longPeriod, 종가);
BuyCond = value Cross Above 0;
SellCond = value Cross Below 0;
// 매수/매도청산
If BuyCond Then Begin
Buy();
Exitshort();
End;
// 매도/매수청산
If SellCond Then Begin
Sell();
Exitlong();
End;
02.
Input : Period1(20), Period2(9), maPeriod(9);
Var : value1(0), value2(0);
value1 = SONAR(Period1,Period2, 종가);
value2 = ema(value1, maPeriod);
// 매수/매도청산
If CrossAbove(value1, value2) Then
Begin
Buy();
Exitshort();
End;
// 매도/매수청산
If CrossBelow(value1, value2) Then
Begin
Sell();
Exitlong();
End;
03.
Input : Period1(20), Period2(9);
Var : value(0);
value = SONAR(Period1, Period2,종가);
// 매수/매도청산
If CrossAbove(value, 0) Then
Begin
Buy();
Exitshort();
End;
// 매도/매수청산
If CrossBelow(value, 0) Then
Begin
Sell();
Exitlong();
End;
수고하세요~~
2021-03-01
697
글번호 146704
시스템