커뮤니티
수식부탁드립니다=================
2010-12-02 19:38:47
595
글번호 34042
다시한번부탁드립니다
INPUTS: R(8), S(5), U(5),매수전봉차(10),매도전봉차(10),손절치(40),익절치(40),연속봉(11),전환값(1),봉이후(13);
var : cnt(0),count(0);
VALUE1 = TSI(C, R, S, U);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if stime >= 91000 and stime < 145000 then{
if value1 >= value1[1]+매수전봉차 Then
buy("Buy1");
if (count == 0 and countif(value1 > value1[1],연속봉) == 연속봉) Or
(count > 0 and BarsSinceExit(1) >= 봉이후 and countif(value1 > value1[1],연속봉) == 연속봉) Then
Buy("buy2");
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice-PriceScale*손절치);
ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)-PriceScale*익절치);
if IsEntryName("buy2") == true and BarsSinceEntry < 5 and value1 <= value1[1]-전환값 Then
exitlong("bx3");
}
if value1 <= value1[1]-매도전봉차 Then
sell("sell1");
if (count == 0 and countif(value1 < value1[1],연속봉) == 연속봉) Or
(count > 0 and BarsSinceExit(1) >= 봉이후 and countif(value1 < value1[1],연속봉) == 연속봉) Then
sell("sell2");
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+PriceScale*손절치);
ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*익절치);
if IsEntryName("sell2") == true and BarsSinceEntry < 5 and value1 >= value1[1]+전환값 Then
ExitShort("sx3");
}
}
호가잔량이평 오실레이터값이 3000 ~ -3000 사이일때는 진입안하게해주세요
감사합니다
답변 1
예스스탁 예스스탁 답변
2010-12-03 10:25:10
안녕하세요
예스스탁입니다.
INPUTS: R(8), S(5), U(5),매수전봉차(10),매도전봉차(10),손절치(40),익절치(40),연속봉(11),전환값(1),봉이후(13);
Input : Period(5);
var : cnt(0),count(0), value(0);
value = ma(bids,period)-ma(asks,period);
VALUE1 = TSI(C, R, S, U);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if stime >= 91000 and stime < 145000 then{
if value1 >= value1[1]+매수전봉차 Then{
if value >= 3000 or value <= -3000 Then
buy("Buy1");
Else
ExitShort();
}
if (count == 0 and countif(value1 > value1[1],연속봉) == 연속봉) Or
(count > 0 and BarsSinceExit(1) >= 봉이후 and countif(value1 > value1[1],연속봉) == 연속봉) Then{
if value >= 3000 or value <= -3000 Then
Buy("buy2");
Else
ExitShort();
}
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice-PriceScale*손절치);
ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)-PriceScale*익절치);
if IsEntryName("buy2") == true and BarsSinceEntry < 5 and value1 <= value1[1]-전환값 Then
exitlong("bx3");
}
if value1 <= value1[1]-매도전봉차 Then{
if value >= 3000 or value <= -3000 Then
sell("sell1");
Else
exitlong();
}
if (count == 0 and countif(value1 < value1[1],연속봉) == 연속봉) Or
(count > 0 and BarsSinceExit(1) >= 봉이후 and countif(value1 < value1[1],연속봉) == 연속봉) Then{
if value >= 3000 or value <= -3000 Then
sell("sell2");
Else
exitlong();
}
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+PriceScale*손절치);
ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*익절치);
if IsEntryName("sell2") == true and BarsSinceEntry < 5 and value1 >= value1[1]+전환값 Then
ExitShort("sx3");
}
}
즐거운 하루되세요
> leekss1 님이 쓴 글입니다.
> 제목 : 수식부탁드립니다=================
> 다시한번부탁드립니다
INPUTS: R(8), S(5), U(5),매수전봉차(10),매도전봉차(10),손절치(40),익절치(40),연속봉(11),전환값(1),봉이후(13);
var : cnt(0),count(0);
VALUE1 = TSI(C, R, S, U);
count = 0;
for cnt = 0 to 20{
if sdate == EntryDate(cnt) Then
count = count+1;
}
if stime >= 91000 and stime < 145000 then{
if value1 >= value1[1]+매수전봉차 Then
buy("Buy1");
if (count == 0 and countif(value1 > value1[1],연속봉) == 연속봉) Or
(count > 0 and BarsSinceExit(1) >= 봉이후 and countif(value1 > value1[1],연속봉) == 연속봉) Then
Buy("buy2");
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice-PriceScale*손절치);
ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)-PriceScale*익절치);
if IsEntryName("buy2") == true and BarsSinceEntry < 5 and value1 <= value1[1]-전환값 Then
exitlong("bx3");
}
if value1 <= value1[1]-매도전봉차 Then
sell("sell1");
if (count == 0 and countif(value1 < value1[1],연속봉) == 연속봉) Or
(count > 0 and BarsSinceExit(1) >= 봉이후 and countif(value1 < value1[1],연속봉) == 연속봉) Then
sell("sell2");
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+PriceScale*손절치);
ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*익절치);
if IsEntryName("sell2") == true and BarsSinceEntry < 5 and value1 >= value1[1]+전환값 Then
ExitShort("sx3");
}
}
호가잔량이평 오실레이터값이 3000 ~ -3000 사이일때는 진입안하게해주세요
감사합니다
이전글