Dear All,
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!
Lorenzo
Added to my conversion list. Will try to do it before holidays, but not sure.. Thanks for being patient.
Thanks Nicolas! There’s no hurry obviously!
I take the opportunity to express my congratulation for the wonderful work you do on this forum!
Lorenzo
Dear All,
did you have any chance to have a look to this request?
Thanks
Lorenzo
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.5
Length= 1.5 //Mid-term: 3.0 / Long-term: 4.5
iVolatility= Length*AverageTrueRange[5](close)
StdevOfVolatility= 3*(1/Sqrt(Length))*Std[30](iVolatility)
EmaM= (High+Low+Close)/3
EmaTR= iVolatility + StdevOfVolatility
//once prev=close
//Stop:=
If( PREV < Close ) then
If( EmaM - EmaTR ) >= PREV then
istop = ( EmaM - EmaTR )
else
istop = PREV
endif
else
istop = ( EmaM - EmaTR )
endif
StopLong= iStop
//Stop:=
If( PREV > Close) then
If( EmaM + EmaTR ) <= PREV then
istop = ( EmaM + EmaTR )
else
istop = PREV
endif
else
istop = ( EmaM + EmaTR )
endif
StopShort= iStop
if close<stoplong[1] then
barssincelong=barindex
endif
if close>stopshort[1] then
barsinceshort=barindex
endif
////If(BarsSince(C < Ref(StopLong,-1)) > BarsSince(C > Ref(StopShort,-1)), StopLong, StopShort);
if barssincelong>barsinceshort then
prev=stopshort
r=255
g=0
else
prev=stoplong
r=0
g=255
endif
return prev coloured(r,g,0) style(line,2)//,stoplong style(dottedline),stopshort
Thank you for the prompt reply!
Let me know what you think of the other two. Are they complicated?
Lorenzo
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).
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
Best
Lorenzo
Hi All,
I would be interested in a Prorealtime code for the sentiment indicator as well… Do you think it would be possible to translate it?
I would be gratefull to anyone who would like to work on this
Thanks a lot
Giorgio
Thanks for your reply.
I tried to submit it through the link you shared but when I click on “send” nothing happen.
Can I submit my request in another way (i.e. e-mail address)?
Thanks
Giorgio
Hi All,
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?
Thanks
Lorenzo
Hi, I think that the below code should work the same, I stumble upon a small error:
Length= 1.5 //Mid-term: 3.0 / Long-term: 4.5
iVolatility= Length*AverageTrueRange[5](close)
StdevOfVolatility= 3*(1/Sqrt(Length))*Std[30](iVolatility)
EmaM= (High+Low+Close)/3
EmaTR= iVolatility + StdevOfVolatility
If( stoplong[1] < Close ) then
If( EmaM - EmaTR ) >= stoplong[1] then
stoplong = ( EmaM - EmaTR )
else
stoplong = stoplong[1]
endif
else
stoplong = ( EmaM - EmaTR )
endif
If( stopshort[1] > Close) then
If( EmaM + EmaTR ) <= stopshort[1] then
stopshort = ( EmaM + EmaTR )
else
stopshort = stopshort[1]
endif
else
stopshort = ( EmaM + EmaTR )
endif
if close crosses over stopshort[1] then
trend=1
elsif close crosses under stoplong[1] then
trend=-1
endif
if trend>=0 then
istop=stoplong
else
istop=stopshort
endif
return istop
Thanks Nicolas for your super fast reply!!!
Have a nice day!
Lorenzo