Indicators from ITFA paper “Number-Based Sentiment Indicators”
12/14/2020 at 6:48 PM #153738
I just notice the paper “Number-Based Sentiment Indicators” on the last issue of ITFA (Metastock). In particular the authors discuss:
- 3 ATR trailing stops (short /mid / long term)
- a sentiment indicator
- a Short-term/Mid-term/Long-term Cycle indicator
I would be interested in seeing the Prorealtime code since I am really not familiar with Metastock lenguage, particularly for the ATR trailing stops and the sentiment indicator.
Can you help me on this topic? I attached two file word containing the code of each indicator plus screenshots taken from the paper.
Thank you very much! And thank you also from the previous conversion I asked!
12/15/2020 at 11:11 AM #15382212/15/2020 at 11:34 AM #15382601/06/2021 at 2:16 PM #15659101/06/2021 at 4:49 PM #156629
Here is the first one, similar to a supertrend somehow, add it 3 times with different Length: Short-term: 1.5 / Mid-term: 3.0 / Long-term: 4.5Trailing Stop Short-term/Mid-term/Long-term1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950Length= 1.5 //Mid-term: 3.0 / Long-term: 4.5iVolatility= Length*AverageTrueRange(close)StdevOfVolatility= 3*(1/Sqrt(Length))*Std(iVolatility)EmaM= (High+Low+Close)/3EmaTR= iVolatility + StdevOfVolatility//once prev=close//Stop:=If( PREV < Close ) thenIf( EmaM - EmaTR ) >= PREV thenistop = ( EmaM - EmaTR )elseistop = PREVendifelseistop = ( EmaM - EmaTR )endifStopLong= iStop//Stop:=If( PREV > Close) thenIf( EmaM + EmaTR ) <= PREV thenistop = ( EmaM + EmaTR )elseistop = PREVendifelseistop = ( EmaM + EmaTR )endifStopShort= iStopif close<stoplong thenbarssincelong=barindexendifif close>stopshort thenbarsinceshort=barindexendif////If(BarsSince(C < Ref(StopLong,-1)) > BarsSince(C > Ref(StopShort,-1)), StopLong, StopShort);if barssincelong>barsinceshort thenprev=stopshortr=255g=0elseprev=stoplongr=0g=255endifreturn prev coloured(r,g,0) style(line,2)//,stoplong style(dottedline),stopshort
1 user thanked author for this post.01/07/2021 at 9:01 AM #15670201/07/2021 at 11:46 AM #156732
As far as I understand those other indicators are comparison between the 3 trailing stop, first there is difference one and the other one is normalized value of the current indicator compared to a lookback period (similar of stochastic).01/07/2021 at 1:56 PM #156748
Yes, that’s correct but unfortunately I don’t know metatrader coding and I can’t really understand the details.
If you think it makes sense, I would be interesting in having a .itf code at least for the sentiment indicator…
If you don’t think it’s worth it please redirect me to the conversion service with a fee.
Thanks a lot for your help and availability
Lorenzo01/13/2021 at 5:48 PM #15768301/14/2021 at 11:03 AM #157774
Private paid programming services is available here: https://www.prorealcode.com/trading-programming-services/01/14/2021 at 6:49 PM #15787704/12/2021 at 7:49 AM #166805
I got a Tradingview script for the above mentioned TradingCycle indicator. However I obtained different values compared to the prt code reported above.
Could anybody provide me a prt code corresponding to Tradingview code I attached here as .doc file?
04/12/2021 at 10:07 AM #166821
Hi, I think that the below code should work the same, I stumble upon a small error:1234567891011121314151617181920212223242526272829303132333435363738Length= 1.5 //Mid-term: 3.0 / Long-term: 4.5iVolatility= Length*AverageTrueRange(close)StdevOfVolatility= 3*(1/Sqrt(Length))*Std(iVolatility)EmaM= (High+Low+Close)/3EmaTR= iVolatility + StdevOfVolatilityIf( stoplong < Close ) thenIf( EmaM - EmaTR ) >= stoplong thenstoplong = ( EmaM - EmaTR )elsestoplong = stoplongendifelsestoplong = ( EmaM - EmaTR )endifIf( stopshort > Close) thenIf( EmaM + EmaTR ) <= stopshort thenstopshort = ( EmaM + EmaTR )elsestopshort = stopshortendifelsestopshort = ( EmaM + EmaTR )endifif close crosses over stopshort thentrend=1elsif close crosses under stoplong thentrend=-1endifif trend>=0 thenistop=stoplongelseistop=stopshortendifreturn istop04/12/2021 at 11:09 AM #166846