커뮤니티

문의드립니다.

프로필 이미지
잡다백수
2018-03-14 12:28:44
262
글번호 117383
답변완료
매번 감사합니다. 1. 코딩 변환 부탁드립니다. Indicator: DIX inputs: Price( Close ), DIXLength( 20 ), UpColor( Cyan ), { Color to use for indicator values that are relatively high, over ColorNormLength bars. } DnColor( Red ), { Color to use for indicator values that are relatively low over ColorNormLength bars. } ColorNormLength( 20 ), { Number of bars over which to normalize the indicator for gradient coloring. See also: comments in function NormGradientColor. } GridForegroundColor( Black ), { Color to use for numbers in RadarScreen cells when gradient coloring is enabled, that is, when both UpColor and DnColor are set to non-negative values. } GridLevel( 10 ) ; { Level at which to plot a horizontal line in chart. Horizontal lines will be plotted at both positive and negative values of this number. } { Set either UpColor and/or DnColor to -1 to disable gradient plot coloring. When disabled, Plot1 color is determined by settings in indicator properties dialog box. Colors of plots 2, 3, and 4 always come from indicator properties dialog box. } variables: ApplicationType( 0 ), DIX( 0 ), ColorLevel( 0 ) ; if CurrentBar = 1 then ApplicationType = GetAppInfo( aiApplicationType ) ; if Price <> 0 then DIX = 100 * ( Price - XAverage( Price, DIXLength ) ) / Price ; Plot1( DIX, “DIX” ) ; Plot2( 0, “ZeroLine” ) ; Plot3( GridLevel, “GridLevel” ) ; Plot4( -1 * GridLevel, “-GridLevel” ) ; { Gradient coloring } if UpColor >= 0 and DnColor >= 0 then begin ColorLevel = NormGradientColor( DIX, true, ColorNormLength, UpColor, DnColor ) ; if ApplicationType = 1 then { study is applied to a chart } SetPlotColor( 1, ColorLevel ) else if ApplicationType > 1 then { study is applied to grid app, like RadarScreen } begin SetPlotColor( 1, GridForegroundColor ) ; SetPlotBGColor( 1, ColorLevel ) ; end ; end ; { Alert criteria - alert if DIX is at its highest or lowest value over DIXLength bars } if HighestBar( DIX, DIXLength ) = 0 then Alert( “DIX is high” ) else if LowestBar( DIX, DIXLength ) = 0 then Alert( “DIX is low” ) ;
시스템
답변 1
프로필 이미지

예스스탁 예스스탁 답변

2018-03-15 09:50:24

안녕하세요 예스스탁입니다. 수식에 내용을 알수 없는 함수들이 있습니다. 해당 내용 제외하고 지표수식 내용만 변환해서 올려드립니다. inputs: DIXLength( 20 ), GridLevel( 10 ) ; variables: ApplicationType( 0 ), DIX( 0 ), ColorLevel( 0 ) ; if C <> 0 then DIX = 100 * ( C - ema( c, DIXLength ) )/ C ; Plot1( DIX, "DIX") ; Plot2( 0,"ZeroLine") ; Plot3( GridLevel,"GridLevel") ; Plot4( -1 * GridLevel,"-GridLevel" ) ; 즐거운 하루되세요 > 잡다백수 님이 쓴 글입니다. > 제목 : 문의드립니다. > 매번 감사합니다. 1. 코딩 변환 부탁드립니다. Indicator: DIX inputs: Price( Close ), DIXLength( 20 ), UpColor( Cyan ), { Color to use for indicator values that are relatively high, over ColorNormLength bars. } DnColor( Red ), { Color to use for indicator values that are relatively low over ColorNormLength bars. } ColorNormLength( 20 ), { Number of bars over which to normalize the indicator for gradient coloring. See also: comments in function NormGradientColor. } GridForegroundColor( Black ), { Color to use for numbers in RadarScreen cells when gradient coloring is enabled, that is, when both UpColor and DnColor are set to non-negative values. } GridLevel( 10 ) ; { Level at which to plot a horizontal line in chart. Horizontal lines will be plotted at both positive and negative values of this number. } { Set either UpColor and/or DnColor to -1 to disable gradient plot coloring. When disabled, Plot1 color is determined by settings in indicator properties dialog box. Colors of plots 2, 3, and 4 always come from indicator properties dialog box. } variables: ApplicationType( 0 ), DIX( 0 ), ColorLevel( 0 ) ; if CurrentBar = 1 then ApplicationType = GetAppInfo( aiApplicationType ) ; if Price <> 0 then DIX = 100 * ( Price - XAverage( Price, DIXLength ) ) / Price ; Plot1( DIX, “DIX” ) ; Plot2( 0, “ZeroLine” ) ; Plot3( GridLevel, “GridLevel” ) ; Plot4( -1 * GridLevel, “-GridLevel” ) ; { Gradient coloring } if UpColor >= 0 and DnColor >= 0 then begin ColorLevel = NormGradientColor( DIX, true, ColorNormLength, UpColor, DnColor ) ; if ApplicationType = 1 then { study is applied to a chart } SetPlotColor( 1, ColorLevel ) else if ApplicationType > 1 then { study is applied to grid app, like RadarScreen } begin SetPlotColor( 1, GridForegroundColor ) ; SetPlotBGColor( 1, ColorLevel ) ; end ; end ; { Alert criteria - alert if DIX is at its highest or lowest value over DIXLength bars } if HighestBar( DIX, DIXLength ) = 0 then Alert( “DIX is high” ) else if LowestBar( DIX, DIXLength ) = 0 then Alert( “DIX is low” ) ;