CHIUSURA MINORE DI X% DA HIGHEST(N)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #48840 quote
    papero76papero76
    Participant
    Senior

    ciao a tutti vorrei sapere quale è il modo migliore per dare questa istruzione

    piualto= highest(N)

    prezzomenopercentuale= piualto-((3/100)*piualto)

    c1= prezzomenopercentuale > close

    if c1 then

    sell at market

    endif

    quindi se chiusura è minore di highest -3% chiudi long

     

    saluti

    #48860 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    E’ bene utilizzare il pulsante “Insert PRT code”, indicato con <> sulla barra grigia qui sopra, per ottenere una migliore comprensione del codice, così:

    piualto= highest(N)
    prezzomenopercentuale= piualto-(piualto*0.03)
    c1= prezzomenopercentuale > close
    if c1 then
       sell at market
    endif

    Il tuo codice mi sembra corretto, anche se io la riga del calcolo la preferisco così, ma è solo una questione di preferenza.

    Roberto

    #48898 quote
    papero76papero76
    Participant
    Senior

    grazie Roberto sei stato velocissimo

Viewing 3 posts - 1 through 3 (of 3 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

CHIUSURA MINORE DI X% DA HIGHEST(N)


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
papero76 @papero76 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by papero76papero76
8 years, 11 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 10/10/2017
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...