예스스탁
예스스탁 답변
2024-04-19 15:04:55
안녕하세요
예스스탁입니다.
input : EmaPeriod(80);
input : RSIPeriod1(7),RSIPeriod2(14),RSIPeriod3(21),RSI차이(7);
input : ADXPeriod(20);
input : 손절틱수(50);
var : Emav(0,Data1),RSI1(0,Data1),RSI2(0,Data1),RSI3(0,Data1),ADXv(0,Data1);
var : Bcond(False,Data1),Scond(False,Data1);
Emav = data1(Ema(C,EmaPeriod));
RSI1 = data1(RSI(RSIPeriod1));
RSI2 = data1(RSI(RSIPeriod2));
RSI3 = data1(RSI(RSIPeriod3));
ADXv = data1(ADX(ADXperiod));
Bcond = MarketPosition == 0 and MarketPosition(1) == 1 and MarketPosition(2) == 1;
Scond = MarketPosition == 0 and MarketPosition(1) == -1 and MarketPosition(2) == -1;
Inputs : DDD(20150309), LEN(300), HL_ED(60), CC(Black);
Vars : DBN(0,Data1), KK(0,Data1), DD(0,Data1), KK2(0,Data1), DD2(0,Data1),hp(0,Data1);
If STime >= 080000 And STime[1] < 080000 Then Begin
DBN = 0;
KK = 0;
DD = 0;
KK2 = 0;
DD2 = 0;
End;
DBN = DBN + 1;
/*If Date == DDD Then Begin*/
If STime >= 083000 And DD == 0 Then Begin
Value2 = O;
DD = 1;
KK = DBN;
hp = H + 0.05;
End;
If DBN > KK + 1 And DD == 1 Then
hp = Value2;
Else
hp = Value2;
if C > Emav and
RSI1 >= RSI2+RSI차이 and RSI2 >= RSI3+RSI차이 and
ADXV >= 21 and
Bcond == False and
Data2(ma(C,60) > ma(C,10)) Then
buy();
if C < Emav and
RSI1 <= RSI2-RSI차이 and RSI2 <= RSI3-RSI차이 and
ADXV >= 21 and
Scond == False and
Data2(ma(C,60) < ma(C,10)) Then
Sell();
if MarketPosition == 1 and CrossDown(c,hp) Then
ExitLong();
if MarketPosition == -1 and Crossup(c,hp) Then
ExitShort();
SetStopLoss(손절틱수*PriceScale,PointStop);
즐거운 하루되세요
> 아트정 님이 쓴 글입니다.
> 제목 : 수식추가
> input : EmaPeriod(80);
input : RSIPeriod1(7),RSIPeriod2(14),RSIPeriod3(21),RSI차이(7);
input : ADXPeriod(20);
input : 익절(50),손절(50);
var : Emav(0,Data1),RSI1(0,Data1),RSI2(0,Data1),RSI3(0,Data1),ADXv(0,Data1);
var : Bcond(False,Data1),Scond(False,Data1);
Input : 당일수익틱수(200);
Var : N1(0,Data1),dayPl(0,Data1),당일수익(0,Data1);
var : Tcond(false,Data1),Xcond(false,Data1);
if Bdate != Bdate[1] Then
{
Xcond = False;
}
당일수익 = data1(PriceScale*당일수익틱수);
if Bdate != Bdate[1] Then
{
Xcond = false;
N1 = NetProfit;
}
daypl = NetProfit-N1;
if TotalTrades > TotalTrades[1] then
{
if daypl >= 당일수익 Then
Xcond = true;
if (IsExitName("dbp",1) == true or IsExitName("dsp",1) == true) then
Xcond = true;
}
Emav = data1(Ema(C,EmaPeriod));
RSI1 = data1(RSI(RSIPeriod1));
RSI2 = data1(RSI(RSIPeriod2));
RSI3 = data1(RSI(RSIPeriod3));
ADXv = data1(ADX(ADXperiod));
Bcond = MarketPosition == 0 and MarketPosition(1) == 1 and MarketPosition(2) == 1;
Scond = MarketPosition == 0 and MarketPosition(1) == -1 and MarketPosition(2) == -1;
if Xcond == false then
{
if C > Emav and
RSI1 >= RSI2+RSI차이 and RSI2 >= RSI3+RSI차이 and
ADXV >= 21 and
Bcond == False and
Data2(ma(C,60) > ma(C,10)) Then
buy();
if C < Emav and
RSI1 <= RSI2-RSI차이 and RSI2 <= RSI3-RSI차이 and
ADXV >= 21 and
Scond == False and
Data2(ma(C,60) < ma(C,10)) Then
Sell();
}
if MarketPosition == 1 then
{
ExitLong("dbp",atlimit,EntryPrice+((당일수익-daypl)/CurrentContracts));
}
if MarketPosition == -1 then
{
ExitShort("dsp",atlimit,EntryPrice-((당일수익-daypl)/CurrentContracts));
}
안녕하세요
위식에서 당일수익삭제.
손절청산기능 추가
매수 진입후 hp선 하락돌파시 손절청산
매도 진입후 hp선을 상승돌파시 손절청산
첨부 Hp선 자유게시판2067