커뮤니티

수식문의

프로필 이미지
백진강
2016-04-07 15:29:49
139
글번호 96955
답변완료
아래의 식에서 손절신호가 나오고 나서 바로 매수매도 스위칭이가능한 수식으로 만들어주세요 감사합니다 Input : shortPeriod(5), longPeriod(20), Period(4),중심(10); Var : value(0) , macdosc(0) ; value = MACD(shortPeriod, longPeriod); macdosc = value-ema(value,Period); Var1=(ema(value,Period)); # 매수/매도청산 If CrossDown(Var1, Value) Then { Buy(); # Buy (atlimit,c-PriceScale*5); } # 매도/매수청산 If CrossUp(Var1, Value) Then { Sell(); # Sell (atlimit,c-PriceScale*5); } if MarketPosition == 1 Then{ exitlong("익",atlimit,EntryPrice+PriceScale*42,"",1,1); if CurrentContracts == MaxContracts Then exitlong("손",AtStop,EntryPrice-PriceScale*15); } if MarketPosition == -1 Then{ ExitShort("익청",atlimit,EntryPrice-PriceScale*42,"",1,1); if CurrentContracts == MaxContracts Then ExitShort("손청",AtStop,EntryPrice+PriceScale*15); }
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2016-04-08 09:29:14

안녕하세요 예스스탁입니다. Input : shortPeriod(5), longPeriod(20), Period(4),중심(10); Var : value(0) , macdosc(0) ; value = MACD(shortPeriod, longPeriod); macdosc = value-ema(value,Period); Var1=(ema(value,Period)); # 매수/매도청산 If CrossDown(Var1, Value) Then { Buy(); # Buy (atlimit,c-PriceScale*5); } # 매도/매수청산 If CrossUp(Var1, Value) Then { Sell(); # Sell (atlimit,c-PriceScale*5); } if MarketPosition == 1 Then{ exitlong("익",atlimit,EntryPrice+PriceScale*42,"",1,1); if CurrentContracts == MaxContracts Then sell("손",AtStop,EntryPrice-PriceScale*15); } if MarketPosition == -1 Then{ ExitShort("익청",atlimit,EntryPrice-PriceScale*42,"",1,1); if CurrentContracts == MaxContracts Then buy("손청",AtStop,EntryPrice+PriceScale*15); } 즐거운 하루되세요 > 백진강 님이 쓴 글입니다. > 제목 : 수식문의 > 아래의 식에서 손절신호가 나오고 나서 바로 매수매도 스위칭이가능한 수식으로 만들어주세요 감사합니다 Input : shortPeriod(5), longPeriod(20), Period(4),중심(10); Var : value(0) , macdosc(0) ; value = MACD(shortPeriod, longPeriod); macdosc = value-ema(value,Period); Var1=(ema(value,Period)); # 매수/매도청산 If CrossDown(Var1, Value) Then { Buy(); # Buy (atlimit,c-PriceScale*5); } # 매도/매수청산 If CrossUp(Var1, Value) Then { Sell(); # Sell (atlimit,c-PriceScale*5); } if MarketPosition == 1 Then{ exitlong("익",atlimit,EntryPrice+PriceScale*42,"",1,1); if CurrentContracts == MaxContracts Then exitlong("손",AtStop,EntryPrice-PriceScale*15); } if MarketPosition == -1 Then{ ExitShort("익청",atlimit,EntryPrice-PriceScale*42,"",1,1); if CurrentContracts == MaxContracts Then ExitShort("손청",AtStop,EntryPrice+PriceScale*15); }