Indicators from ITFA paper “Number-Based Sentiment Indicators”

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #153738 quote
    lorebrunolorebruno
    Participant
    New

    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

    Trailing-Stop-Short-term_Mid-term_Long-term-.docx Trailing-Stops-ATR.jpg Trailing-Stops-ATR.jpg Sentiment-ITFA.jpg Sentiment-ITFA.jpg Cycles-Indicators.jpg Cycles-Indicators.jpg
    #153822 quote
    NicolasNicolas
    Keymaster
    Legend

    Added to my conversion list. Will try to do it before holidays, but not sure.. Thanks for being patient.

    #153826 quote
    lorebrunolorebruno
    Participant
    New

    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

    #156591 quote
    lorebrunolorebruno
    Participant
    New

    Dear All,

    did you have any chance to have a look to this request?

    Thanks

    Lorenzo

    #156629 quote
    NicolasNicolas
    Keymaster
    Legend

    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
    Monobrow thanked this post
    trailing-stop-short-mid-and-long-term.png trailing-stop-short-mid-and-long-term.png
    #156702 quote
    lorebrunolorebruno
    Participant
    New

    Thank you for the prompt reply!

    Let me know what you think of the other two. Are they complicated?

     

    Lorenzo

    #156732 quote
    NicolasNicolas
    Keymaster
    Legend

    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).

    #156748 quote
    lorebrunolorebruno
    Participant
    New

    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

    #157683 quote
    g_tinig_tini
    Participant
    New

    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

    #157774 quote
    NicolasNicolas
    Keymaster
    Legend

    Private paid programming services is available here: https://www.prorealcode.com/trading-programming-services/

    #157877 quote
    g_tinig_tini
    Participant
    New

    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

    #166805 quote
    lorebrunolorebruno
    Participant
    New

    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

    TrailingStop-Cycles.docx
    #166821 quote
    NicolasNicolas
    Keymaster
    Legend

    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
    #166846 quote
    lorebrunolorebruno
    Participant
    New

    Thanks Nicolas for your super fast reply!!!

    Have a nice day!

    Lorenzo

Viewing 14 posts - 1 through 14 (of 14 total)
  • You must be logged in to reply to this topic.
ProRealAI ProRealAI New

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

Indicators from ITFA paper “Number-Based Sentiment Indicators”


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
lorebruno @lorebruno Participant
Summary

This topic contains 13 replies,
has 3 voices, and was last updated by lorebrunolorebruno
5 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/14/2020
Status: Active
Attachments: 6 files
ProRealCode ProRealCode
Loading...