커뮤니티

수식변환 부탁드립니다.

프로필 이미지
예시스
2013-04-03 15:45:56
717
글번호 61646
답변완료
안녕하세요? 다음은 EL 수식인데 초보인데다 검색 실력이 부족해서인지 관련 내용을 찾을 수 없어 YL 변환 부탁드립니다. 가. 지표식 1. inputs: Price( Close ), Length( 3 ), Smoothing( 3 ), RSI_Color( Blue ), RSI_MA_Color( Red ) , MidpointColor( LightGray ) ; variables: RSIValue( 0 ), RSI_MA( 0 ) ; RSIValue = RSI( Price, Length ) ; RSI_MA = Average( RSIValue, Smoothing ) ; Plot1( RSIValue, "RSI", RSI_Color ) ; Plot2( RSI_MA, "RSI_MA", RSI_MA_Color ) ; Plot3( 50, "MidPoint", MidpointColor ) ; Plot4( 80, "Upper", MidPointColor ) ; Plot5( 20, "Lower", MidPointColor ) ; 2. inputs: Price( Close ), Length( 3 ), Smoothing( 3 ), OffsetPct( 10 ) ; variables: intrabarpersist OBMultiplier( 0 ), intrabarpersist OSMultiplier( 0 ), RSI_MA( 0 ) ; Once begin OBMultiplier = 1 + 0.01 * OffsetPct ; OSMultiplier = 1 - 0.01 * OffsetPct ; end ; RSI_MA = Average( RSI( Price, Length ), Smoothing ) ; if CurrentBar > Smoothing then if RSI_MA > 80 then Plot1( Close * OBMultiplier, "OverBought" ) else if RSI_MA < 20 then Plot2( Close * OSMultiplier, "OverSold" ) ; 나. 시스템 1. inputs: Price( Close ), Length( 3 ), TrailingAmt( 3 ) ; variables: StopPrice( 0 ), RSIValue( 0 ) ; RSIValue = RSI( Price, Length ) ; if MarketPosition = 1 and StopPrice > 0 then Sell next bar at StopPrice stop else if MarketPosition = -1 and StopPrice > 0 then BuyToCover next bar StopPrice stop ; if RSIValue crosses over 50 then begin Buy next bar market ; StopPrice = Low[1] ; Sell next bar at StopPrice stop ; end else if RSIValue crosses under 50 then begin SellShort next bar at market ; StopPrice = High[1] ; BuyToCover next bar StopPrice stop ; end ; SetStopShare ; SetDollarTrailing( TrailingAmt ) ; 2. inputs: Price( Close ), RSI_Length( 3 ), RSI_Smoothing( 3 ), OverSold( 20 ), OverBought( 80 ), TrailingAmt( 3 ) ; variables: RSI_MA( 0 ) ; RSI_MA = Average( RSI( Price, RSI_Length ), RSI_Smoothing ) ; if RSI_MA crosses over OverSold then Buy next bar market else if RSI_MA crosses under OverBought then SellShort next bar at market ; SetStopShare ; SetDollarTrailing( TrailingAmt ) ; 3. inputs: Price( Close ), RSI_Length( 3 ), RSI_Smoothing( 3 ), BollingerLength( 20 ), NumDevs( 1 ), OverSold( 20 ), OverBought( 80 ), TrailingAmt( 3 ) ; variables: RSI_MA( 0 ), UpperBand( 0 ), LowerBand( 0 ) ; RSI_MA = Average( RSI( Price, RSI_Length ), RSI_Smoothing ) ; UpperBand = BollingerBand( Price, BollingerLength, NumDevs ) ; LowerBand = BollingerBand( Price, BollingerLength, -1 * NumDevs ) ; if RSI_MA crosses over OverSold and Close crosses over LowerBand then Buy next bar market else if RSI_MA crosses under OverBought and Close crosses under UpperBand then SellShort next bar at market ; SetStopShare ; SetDollarTrailing( TrailingAmt ) ;
지표
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2013-04-03 18:14:45

안녕하세요 예스스탁입니다. 지표1 inputs: Length( 3 ), Smoothing( 3 ), RSI_Color( Blue ), RSI_MA_Color( Red ) , MidpointColor(Gray) ; variables: RSIValue( 0 ), RSI_MA( 0 ) ; RSIValue = RSI( Length ) ; RSI_MA = Ma( RSIValue, Smoothing ) ; Plot1( RSIValue, "RSI", RSI_Color ) ; Plot2( RSI_MA, "RSI_MA", RSI_MA_Color ) ; Plot3( 50, "MidPoint", MidpointColor ) ; Plot4( 80, "Upper", MidPointColor ) ; Plot5( 20, "Lower", MidPointColor ) ; 지표2 해당식에 모르는 문법이 있어 변경가능하지 않습니다. 시스템 1 inputs: Length( 3 ), TrailingAmt( 3 ) ; variables: StopPrice( 0 ), RSIValue( 0 ) ; RSIValue = RSI(Length ) ; if MarketPosition == 1 and StopPrice > 0 then ExitLong("bx",AtStop, StopPrice); else if MarketPosition == -1 and StopPrice > 0 then ExitShort("sx",AtStop,StopPrice); if crossup(RSIValue,50) then begin Buy("b",AtMarket); StopPrice = Low[1]; ExitLong("bx1",AtStop,StopPrice); end else if CrossDown(RSIValue,50) then begin sell("s",atmarket); StopPrice = High[1] ; ExitShort("sx1",AtStop,StopPrice); end ; if MarketPosition == 1 then exitlong("btr",AtStop,highest(H,BarsSinceEntry)-TrailingAmt); if MarketPosition == -1 then ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+TrailingAmt); 시스템2 inputs: RSI_Length( 3 ), RSI_Smoothing( 3 ), OverSold( 20 ), OverBought( 80 ), TrailingAmt( 3 ) ; variables: RSI_MA( 0 ) ; RSI_MA = ma( RSI(RSI_Length ), RSI_Smoothing ) ; if crossup(RSI_MA,OverSold) then Buy("b",AtMarket); else if crossdown(RSI_MA,OverBought) then sell("s",AtMarket); if MarketPosition == 1 then exitlong("btr",AtStop,highest(H,BarsSinceEntry)-TrailingAmt); if MarketPosition == -1 then ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+TrailingAmt); 시스템3 inputs: RSI_Length( 3 ), RSI_Smoothing( 3 ), BollingerLength( 20 ), NumDevs( 1 ), OverSold( 20 ), OverBought( 80 ), TrailingAmt( 3 ) ; variables: RSI_MA( 0 ), UpperBand( 0 ), LowerBand( 0 ) ; RSI_MA = ma( RSI(RSI_Length ),RSI_Smoothing ) ; UpperBand = BollBandUp(BollingerLength,NumDevs); LowerBand = BollBandDown(BollingerLength,NumDevs); if crossup(RSI_MA,OverSold) and crossup(c,LowerBand) then Buy("b",AtMarket); else if crossdown(RSI_MA,OverBought) and crossdown(Close,UpperBand) then Sell("s",atmarket); if MarketPosition == 1 then exitlong("btr",AtStop,highest(H,BarsSinceEntry)-TrailingAmt); if MarketPosition == -1 then ExitShort("str",AtStop,Lowest(L,BarsSinceEntry)+TrailingAmt); 즐거운 하루되세요 > 예시스 님이 쓴 글입니다. > 제목 : 수식변환 부탁드립니다. > 안녕하세요? 다음은 EL 수식인데 초보인데다 검색 실력이 부족해서인지 관련 내용을 찾을 수 없어 YL 변환 부탁드립니다. 가. 지표식 1. inputs: Price( Close ), Length( 3 ), Smoothing( 3 ), RSI_Color( Blue ), RSI_MA_Color( Red ) , MidpointColor( LightGray ) ; variables: RSIValue( 0 ), RSI_MA( 0 ) ; RSIValue = RSI( Price, Length ) ; RSI_MA = Average( RSIValue, Smoothing ) ; Plot1( RSIValue, "RSI", RSI_Color ) ; Plot2( RSI_MA, "RSI_MA", RSI_MA_Color ) ; Plot3( 50, "MidPoint", MidpointColor ) ; Plot4( 80, "Upper", MidPointColor ) ; Plot5( 20, "Lower", MidPointColor ) ; 2. inputs: Price( Close ), Length( 3 ), Smoothing( 3 ), OffsetPct( 10 ) ; variables: intrabarpersist OBMultiplier( 0 ), intrabarpersist OSMultiplier( 0 ), RSI_MA( 0 ) ; Once begin OBMultiplier = 1 + 0.01 * OffsetPct ; OSMultiplier = 1 - 0.01 * OffsetPct ; end ; RSI_MA = Average( RSI( Price, Length ), Smoothing ) ; if CurrentBar > Smoothing then if RSI_MA > 80 then Plot1( Close * OBMultiplier, "OverBought" ) else if RSI_MA < 20 then Plot2( Close * OSMultiplier, "OverSold" ) ; 나. 시스템 1. inputs: Price( Close ), Length( 3 ), TrailingAmt( 3 ) ; variables: StopPrice( 0 ), RSIValue( 0 ) ; RSIValue = RSI( Price, Length ) ; if MarketPosition = 1 and StopPrice > 0 then Sell next bar at StopPrice stop else if MarketPosition = -1 and StopPrice > 0 then BuyToCover next bar StopPrice stop ; if RSIValue crosses over 50 then begin Buy next bar market ; StopPrice = Low[1] ; Sell next bar at StopPrice stop ; end else if RSIValue crosses under 50 then begin SellShort next bar at market ; StopPrice = High[1] ; BuyToCover next bar StopPrice stop ; end ; SetStopShare ; SetDollarTrailing( TrailingAmt ) ; 2. inputs: Price( Close ), RSI_Length( 3 ), RSI_Smoothing( 3 ), OverSold( 20 ), OverBought( 80 ), TrailingAmt( 3 ) ; variables: RSI_MA( 0 ) ; RSI_MA = Average( RSI( Price, RSI_Length ), RSI_Smoothing ) ; if RSI_MA crosses over OverSold then Buy next bar market else if RSI_MA crosses under OverBought then SellShort next bar at market ; SetStopShare ; SetDollarTrailing( TrailingAmt ) ; 3. inputs: Price( Close ), RSI_Length( 3 ), RSI_Smoothing( 3 ), BollingerLength( 20 ), NumDevs( 1 ), OverSold( 20 ), OverBought( 80 ), TrailingAmt( 3 ) ; variables: RSI_MA( 0 ), UpperBand( 0 ), LowerBand( 0 ) ; RSI_MA = Average( RSI( Price, RSI_Length ), RSI_Smoothing ) ; UpperBand = BollingerBand( Price, BollingerLength, NumDevs ) ; LowerBand = BollingerBand( Price, BollingerLength, -1 * NumDevs ) ; if RSI_MA crosses over OverSold and Close crosses over LowerBand then Buy next bar market else if RSI_MA crosses under OverBought and Close crosses under UpperBand then SellShort next bar at market ; SetStopShare ; SetDollarTrailing( TrailingAmt ) ;