커뮤니티
시스템식
2013-08-07 12:57:35
145
글번호 66188
아래 두개의 식을 하나로 변형해주세요.
SetStopProfittarget과 SetStopLoss는 두번째식에만 적용되게끔 변형해주세요.
Input : stoPeriod(12), stoPeriod1(5);
Input : RsiPeriod(14), LPercent(30), SPercent(70);
value1 = StochasticsK(stoPeriod,stoPeriod1);
value2 = RSI(RsiPeriod);
If CrossUP(value1, 20) Then
{
Buy("b1");
}
If IsEntryName("b1") == true and CrossDown(value1, 80) Then
{
Sell();
}
If CrossUP(value2, LPercent) Then
{
Buy("b2");
}
If IsEntryName("b2") == true and CrossDown(value2, SPercent) Then
{
Sell();
}
--------------------------------------------------------------------
Input : shortPeriod(5), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
If CrossUP(value1, value2) Then
{
Buy();
}
SetStopProfittarget(0.9,PercentStop);
SetStopLoss(0.7,PercentStop);
답변 1
예스스탁 예스스탁 답변
2013-08-07 14:31:44
안녕하세요
예스스탁입니다.
Input : stoPeriod(12), stoPeriod1(5);
Input : RsiPeriod(14), LPercent(30), SPercent(70);
Input : shortPeriod(5), longPeriod(20);
value1 = StochasticsK(stoPeriod,stoPeriod1);
value2 = RSI(RsiPeriod);
value3 = ma(C, shortPeriod);
value4 = ma(C, longPeriod);
If CrossUP(value1, 20) Then
{
Buy("b1");
}
If IsEntryName("b1") == true and CrossDown(value1, 80) Then
{
Sell("s1s");
}
If CrossUP(value2, LPercent) Then
{
Buy("b2");
}
If IsEntryName("b2") == true and CrossDown(value2, SPercent) Then
{
Sell("b2s");
}
If CrossUP(value3, value4) Then
{
Buy("b3");
}
if IsEntryName("b3") == true Then{
SetStopProfittarget(0.9,PercentStop);
SetStopLoss(0.7,PercentStop);
}
Else{
SetStopProfittarget(0);
SetStopLoss(0);
}
즐거운 하루되세요
> erwe343 님이 쓴 글입니다.
> 제목 : 시스템식
> 아래 두개의 식을 하나로 변형해주세요.
SetStopProfittarget과 SetStopLoss는 두번째식에만 적용되게끔 변형해주세요.
Input : stoPeriod(12), stoPeriod1(5);
Input : RsiPeriod(14), LPercent(30), SPercent(70);
value1 = StochasticsK(stoPeriod,stoPeriod1);
value2 = RSI(RsiPeriod);
If CrossUP(value1, 20) Then
{
Buy("b1");
}
If IsEntryName("b1") == true and CrossDown(value1, 80) Then
{
Sell();
}
If CrossUP(value2, LPercent) Then
{
Buy("b2");
}
If IsEntryName("b2") == true and CrossDown(value2, SPercent) Then
{
Sell();
}
--------------------------------------------------------------------
Input : shortPeriod(5), longPeriod(20);
value1 = ma(C, shortPeriod);
value2 = ma(C, longPeriod);
If CrossUP(value1, value2) Then
{
Buy();
}
SetStopProfittarget(0.9,PercentStop);
SetStopLoss(0.7,PercentStop);
다음글
이전글