커뮤니티
수식 추가부탁합니다
2014-02-13 21:54:45
179
글번호 72535
안녕하세요
1,2식 모두에 추가식 부탁할께요
매수 매도 진입후 +- 너스,10틱 이하에는 반대포지션으로 안바뀌도록해주세요
너무 잖은 매수 매도가 일어나서 추가로 식을 만들려구요
손절은 10틱으로 해주세요
수고하세요~~~
1.
value1 = (highest(H,9)+lowest(L,9))/2; //전환
value2 = (highest(H,26)+lowest(L,26))/2; //기준
if (stime >= 160000 and stime < 180000) Or
(stime >= 200000 and stime < 220000) then{
If crossup(value1,value2) Then
{
Buy ("LE") ;
}
If crossdown(value1,value2) Then
{
Sell ("SE");
}
}
if CrossDown(value1,value2) Then
ExitLong();
if crossup(value1,value2) Then
ExitShort();
2.
Input : shortPeriod(18), longPeriod(26), Period(9);
value1 = MACD(shortPeriod, longPeriod);
value2 = ema(value1, Period);
value3 = (Highest(High, 9) + Lowest(Low, 9)) / 2;
value4 = (Highest(High, 26) + Lowest(Low, 26)) / 2;
Condition1 = value1 > value2 and value3 > value4;
Condition2 = value1 < value2 and value3 < value4;
if stime >= 180000 and stime < 240000 then{
If Condition1 == true and Condition1[1] == false Then
Buy();
If Condition2 == true and Condition2[1] == false Then
Sell();
}
If Condition2 == true and Condition2[1] == false Then
ExitLong();
If Condition1 == true and Condition1[1] == false Then
ExitShort();
답변 1
예스스탁 예스스탁 답변
2014-02-14 10:44:05
안녕하세요
예스스탁입니다.
1.
value1 = (highest(H,9)+lowest(L,9))/2; //전환
value2 = (highest(H,26)+lowest(L,26))/2; //기준
if (stime >= 160000 and stime < 180000) Or
(stime >= 200000 and stime < 220000) then{
If crossup(value1,value2) Then
{
if MarketPosition == 0 or (MarketPosition == -1 and abs(C-EntryPrice) >= PriceScale*10) Then
Buy ("LE") ;
}
If crossdown(value1,value2) Then
{
if MarketPosition == 0 or (MarketPosition == 1 and abs(C-EntryPrice) >= PriceScale*10) Then
Sell ("SE");
}
}
if CrossDown(value1,value2) Then
ExitLong();
if crossup(value1,value2) Then
ExitShort();
2.
Input : shortPeriod(18), longPeriod(26), Period(9);
value1 = MACD(shortPeriod, longPeriod);
value2 = ema(value1, Period);
value3 = (Highest(High, 9) + Lowest(Low, 9)) / 2;
value4 = (Highest(High, 26) + Lowest(Low, 26)) / 2;
Condition1 = value1 > value2 and value3 > value4;
Condition2 = value1 < value2 and value3 < value4;
if stime >= 180000 and stime < 240000 then{
If Condition1 == true and Condition1[1] == false Then{
if MarketPosition == 0 or (MarketPosition == -1 and abs(C-EntryPrice) >= PriceScale*10) Then
Buy();
}
If Condition2 == true and Condition2[1] == false Then {
if MarketPosition == 0 or (MarketPosition == -1 and abs(C-EntryPrice) >= PriceScale*10) Then
Sell();
}
}
If Condition2 == true and Condition2[1] == false Then
ExitLong();
If Condition1 == true and Condition1[1] == false Then
ExitShort();
즐거운 하루되세요
> HI_jh***** 님이 쓴 글입니다.
> 제목 : 수식 추가부탁합니다
> 안녕하세요
1,2식 모두에 추가식 부탁할께요
매수 매도 진입후 +- 너스,10틱 이하에는 반대포지션으로 안바뀌도록해주세요
너무 잖은 매수 매도가 일어나서 추가로 식을 만들려구요
손절은 10틱으로 해주세요
수고하세요~~~
1.
value1 = (highest(H,9)+lowest(L,9))/2; //전환
value2 = (highest(H,26)+lowest(L,26))/2; //기준
if (stime >= 160000 and stime < 180000) Or
(stime >= 200000 and stime < 220000) then{
If crossup(value1,value2) Then
{
Buy ("LE") ;
}
If crossdown(value1,value2) Then
{
Sell ("SE");
}
}
if CrossDown(value1,value2) Then
ExitLong();
if crossup(value1,value2) Then
ExitShort();
2.
Input : shortPeriod(18), longPeriod(26), Period(9);
value1 = MACD(shortPeriod, longPeriod);
value2 = ema(value1, Period);
value3 = (Highest(High, 9) + Lowest(Low, 9)) / 2;
value4 = (Highest(High, 26) + Lowest(Low, 26)) / 2;
Condition1 = value1 > value2 and value3 > value4;
Condition2 = value1 < value2 and value3 < value4;
if stime >= 180000 and stime < 240000 then{
If Condition1 == true and Condition1[1] == false Then
Buy();
If Condition2 == true and Condition2[1] == false Then
Sell();
}
If Condition2 == true and Condition2[1] == false Then
ExitLong();
If Condition1 == true and Condition1[1] == false Then
ExitShort();
다음글
이전글