커뮤니티
문의 드립니다
2019-06-06 14:28:29
302
글번호 129240
안녕하십니까..
아래 수식에다
1- 60이평 위에서는 매도신호가 안나오도록
2- 60이평 아래서는 매수신호가 안나오도록
하고자 합니다.
감사합니다.
-------------
input : Period(60), Period1(25), Period2(5);
var : stok(0),stod(0);
stok = StochasticsK(Period,Period1);
stod = StochasticsD(Period,Period1,Period2);
If CrossUP(stok, stod) then
if TotalTrades == 0 or
(MarketPosition == -1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
{
Buy();
}
If CrossDown(stok, stod) Then
if TotalTrades == 0 or
(MarketPosition == 1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) then
{
sell();
}
답변 1
예스스탁 예스스탁 답변
2019-06-07 09:35:05
안녕하세요
예스스탁입니다.
input : Period(60), Period1(25), Period2(5),P(60);
var : stok(0),stod(0),mav(0);
stok = StochasticsK(Period,Period1);
stod = StochasticsD(Period,Period1,Period2);
mav = ma(C,P);
If CrossUP(stok, stod) and c > mav then
{
if TotalTrades == 0 or
(MarketPosition == -1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
{
Buy();
}
}
If CrossDown(stok, stod) and c < mav Then
{
if TotalTrades == 0 or
(MarketPosition == 1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) then
{
sell();
}
}
즐거운 하루되세요
> 호시우보 님이 쓴 글입니다.
> 제목 : 문의 드립니다
> 안녕하십니까..
아래 수식에다
1- 60이평 위에서는 매도신호가 안나오도록
2- 60이평 아래서는 매수신호가 안나오도록
하고자 합니다.
감사합니다.
-------------
input : Period(60), Period1(25), Period2(5);
var : stok(0),stod(0);
stok = StochasticsK(Period,Period1);
stod = StochasticsD(Period,Period1,Period2);
If CrossUP(stok, stod) then
if TotalTrades == 0 or
(MarketPosition == -1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) Then
{
Buy();
}
If CrossDown(stok, stod) Then
if TotalTrades == 0 or
(MarketPosition == 1 and BarsSinceEntry >= 50) or
(TotalTrades >= 1 and MarketPosition == 0 and BarsSinceExit(1) >= 50) then
{
sell();
}
다음글
이전글