Support Board
Date/Time: Wed, 22 Jan 2025 12:46:09 +0000
Post From: REQ:Double Stochastic code
[2018-09-02 10:35:04] |
franmadrid - Posts: 24 |
Hi guys, I am looking for a double stochastic code. Exactly I am working in Ninja and Multichart and I want to move my double stochastic to Sierra. But in Sierra the D.Stochastic is very diferent , meaby the calculation is diferent. Anyone can help to me get DS from Ninja or MC to Sierra. ?? I leave you a snapshot to compare the 3 software. (the snapshot have 3diferent period 5,18 and 70 over ema75 in MC and ninja . In Sierra I posted only the 18 (blueone)) The MC (easy language) calculation is this: [LegacyColorValue = true]; {_DStoc: Double Stochastic} Inputs: DStLen(NumericSimple) ; Vars: Num(0), Denom(0), Ratio(0), PctK(0), DNum(0), DDenom(0), DRatio(0), DPctK(0) ; {Stoc} Num=C-_Lst(L,DStLen); Denom=_Hst(H,DStLen)-_Lst(L,DStLen); Ratio=IFF(Denom>0,(Num/Denom)*100,Ratio[1]); PctK=IFF(CurrentBar=1,Ratio,PctK[1]+(.5*(Ratio-PctK[1]))); {DStoc} DNum=PctK-_Lst(PctK,DStLen); DDenom=_Hst(PctK,DStLen)-_Lst(PctK,DStLen); DRatio=IFF(DDenom>0,(DNum/DDenom)*100,DRatio[1]); DPctK=IFF(CurrentBar=1,DRatio,DPctK[1]+(.5*(DRatio-DPctK[1]))); _DStoc=DPctK; |
sierra_double_stochastic_vs_ninja_MC.jpg / V - Attached On 2018-09-02 10:33:12 UTC - Size: 1.38 MB - 333 views |