커뮤니티
문의드립니다
2015-12-18 11:07:24
105
글번호 93579
Input : Period1(00);
input : stime1(00);
input : stime2(00);
var : Stok(0);
StoK = StochasticsK(Period1,5);
input : B1(70),B1X(30),S1(30),S1X(70) ;
if MarketPosition == 0
and sTime >= stime1
and sTime <= stime2
and StoK > B1
Then
buy("B1");
if MarketPosition == 1
and IsEntryName("B1") == true
and StoK < B1X
Then
exitlong("B1X");
if MarketPosition == 0
and sTime >= stime1
and sTime <= stime2
and StoK < S1
Then
sell("S1");
if MarketPosition == -1
and IsEntryName("S1") == true
and StoK > S1X
Then
ExitShort("S1X");
if MarketPosition == 1
Then
Buy("B999");
if MarketPosition == -1
Then
Sell("S999");
위 식에서
피라미딩 모든진입 허용을 클릭하고
if MarketPosition == 1
Then
Buy("B999");
if MarketPosition == -1
Then
Sell("S999");
여기 부분을 1봉 마다 신호가 나오는게 아니라
N봉 마다 진입신호가 나오게 하고 싶습니다
답변 1
예스스탁 예스스탁 답변
2015-12-18 14:26:42
안녕하세요
예스스탁입니다.
Input : Period1(00);
input : stime1(00);
input : stime2(00);
input : B1(70),B1X(30),S1(30),S1X(70) ;
input : N(3);
var : Stok(0);
StoK = StochasticsK(Period1,5);
if MarketPosition == 0
and sTime >= stime1
and sTime <= stime2
and StoK > B1
Then
buy("B1");
if MarketPosition == 1
and IsEntryName("B1") == true
and StoK < B1X
Then
exitlong("B1X");
if MarketPosition == 0
and sTime >= stime1
and sTime <= stime2
and StoK < S1
Then
sell("S1");
if MarketPosition == -1
and IsEntryName("S1") == true
and StoK > S1X
Then
ExitShort("S1X");
if MarketPosition == 1 and BarsSinceEntry%N == 0 Then
Buy("B999");
if MarketPosition == -1 and BarsSinceEntry%N == 0 Then
Sell("S999");
즐거운 하루되세요
> 파인애플 님이 쓴 글입니다.
> 제목 : 문의드립니다
>
Input : Period1(00);
input : stime1(00);
input : stime2(00);
var : Stok(0);
StoK = StochasticsK(Period1,5);
input : B1(70),B1X(30),S1(30),S1X(70) ;
if MarketPosition == 0
and sTime >= stime1
and sTime <= stime2
and StoK > B1
Then
buy("B1");
if MarketPosition == 1
and IsEntryName("B1") == true
and StoK < B1X
Then
exitlong("B1X");
if MarketPosition == 0
and sTime >= stime1
and sTime <= stime2
and StoK < S1
Then
sell("S1");
if MarketPosition == -1
and IsEntryName("S1") == true
and StoK > S1X
Then
ExitShort("S1X");
if MarketPosition == 1
Then
Buy("B999");
if MarketPosition == -1
Then
Sell("S999");
위 식에서
피라미딩 모든진입 허용을 클릭하고
if MarketPosition == 1
Then
Buy("B999");
if MarketPosition == -1
Then
Sell("S999");
여기 부분을 1봉 마다 신호가 나오는게 아니라
N봉 마다 진입신호가 나오게 하고 싶습니다