커뮤니티
수식추가부탁드립니다==============
2010-12-02 08:58:16
738
글번호 34020
INPUTS: R(8), S(5), U(5),매수전봉차(1.8),매도전봉차(2),손절치(28),익절치(50),연속봉(11);
VALUE1 = TSI(C, R, S, U);
if stime >= 91000 and stime < 145000 then{
if value1 >= value1[1]+매수전봉차 or countif(value1 > value1[1],연속봉) == 연속봉 Then
Buy();
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice-PriceScale*손절치);
ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)-PriceScale*익절치);
}
if value1 <= value1[1]-매도전봉차 or countif(value1 < value1[1],연속봉) == 연속봉 Then
sell();
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+PriceScale*손절치);
ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*익절치);
}
}
위식에다가 호가잔량 이평오실레이터값이 3000 ~ -3000 사이에 있을 때는 진입안하게 해주세요
답변 1
예스스탁 예스스탁 답변
2010-12-02 17:47:42
안녕하세요
예스스탁입니다.
INPUTS: R(8), S(5), U(5),매수전봉차(1.8),매도전봉차(2),손절치(28),익절치(50),연속봉(11);
Input : Period(5);
Var : value(0);
value = ma(bids,period)-ma(asks,period);
VALUE1 = TSI(C, R, S, U);
if stime >= 91000 and stime < 145000 then{
if value1 >= value1[1]+매수전봉차 or countif(value1 > value1[1],연속봉) == 연속봉 Then{
if value >= 3000 or value <= -3000 Then
Buy();
Else
ExitShort();
}
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice-PriceScale*손절치);
ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)-PriceScale*익절치);
}
if value1 <= value1[1]-매도전봉차 or countif(value1 < value1[1],연속봉) == 연속봉 Then{
if value >= 3000 or value <= -3000 Then
sell();
Else
ExitLong();
}
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+PriceScale*손절치);
ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*익절치);
}
}
즐거운 하루되세요
> leekss1 님이 쓴 글입니다.
> 제목 : 수식추가부탁드립니다==============
>
INPUTS: R(8), S(5), U(5),매수전봉차(1.8),매도전봉차(2),손절치(28),익절치(50),연속봉(11);
VALUE1 = TSI(C, R, S, U);
if stime >= 91000 and stime < 145000 then{
if value1 >= value1[1]+매수전봉차 or countif(value1 > value1[1],연속봉) == 연속봉 Then
Buy();
if MarketPosition == 1 Then{
ExitLong("bx1",AtStop,EntryPrice-PriceScale*손절치);
ExitLong("bx2",AtStop,highest(H,BarsSinceEntry)-PriceScale*익절치);
}
if value1 <= value1[1]-매도전봉차 or countif(value1 < value1[1],연속봉) == 연속봉 Then
sell();
if MarketPosition == -1 Then{
ExitShort("sx1",AtStop,EntryPrice+PriceScale*손절치);
ExitShort("sx2",AtStop,Lowest(L,BarsSinceEntry)+PriceScale*익절치);
}
}
위식에다가 호가잔량 이평오실레이터값이 3000 ~ -3000 사이에 있을 때는 진입안하게 해주세요
다음글
이전글