Traduzione codice Metastock per trailingstop e forza relativa

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #173432 quote
    Tom81Tom81
    Participant
    New

    Buongiorno,

    innanzitutto scusate ma non vedo più il pulsante per indicare il codice.

    Venendo a noi, stavo leggendo un libro che presenta i seguenti codici Metastock ma non conoscendo il linguaggio ho difficoltà a comprenderli.

    Potreste aiutarmi a tradurli in linguaggio PRT?

    Grazie

     

    Codice per SL

    pds:=30:

    Mult:=3

    TruRan:=Mov(ATR(2.8),pds,W)*Mult;HiLimit:=HHV(H,pds)-TruRan;

    LoLimit:=LLV(L,pds)+Truran;

    If(C>HiLimit,Hilimit,LoLimit)

     

     

    L’altro codice per la Forza Relativa è

     

    (((C-Ref(C,-3))/Ref(C,-3))+((C-Ref(C,-6))/Ref(C,-6))+((C-Ref(C,-8))/Ref(C,-8)))/3

    #177123 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Il primo (SL) è:

    pds     = 30
    Mult    = 3
    TruRan  = average[pds,0](AverageTRueRange[3]) * Mult
    HiLimit = highest[pds](high) - TruRan
    LoLimit = lowest[pds](low)   + TruRan
    MyLimit = LoLimit
    IF Close > HiLimit THEN
    MyLimit = HiLimit
    ENDIF
    RETURN MyLimit AS "SL"

    il secondo (Forza Relativa) è:

    c1 = (close - close[3]) / close[3]
    c2 = (close - close[6]) / close[6]
    c3 = (close - close[8]) / close[8]
    fr = (c1 + c2 + c3) / 3
    RETURN fr AS "Forza Relativa"
Viewing 2 posts - 1 through 2 (of 2 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

Traduzione codice Metastock per trailingstop e forza relativa


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Tom81 @tom81 Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
5 years ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 07/10/2021
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...