Uscita posizione long – stop loss

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #186973 quote
    Hunry86
    Participant
    New

    Buongiorno,

    sto cercando di impostare una condizione per uscire da posizione long nel seguente modo: se il prezzo corrente mi supera il massimo della candela precedente allora esci. (vorrei che questo fosse anche il mio stop a tutti gli effetti.)

    Grazie mille per chi risponderà.

    #186974 quote
    Hunry86
    Participant
    New

    Ho provato a scriverla in questo modo:

    c6 = close <= low[2]

    IF c6 THEN
    SELL AT MARKET
    ENDIF

    tuttavia mi sembra non funzionare bene, qualche suggerimento?

    #186975 quote
    robertogozzi
    Moderator
    Master

    Non funziona perché:

    • LOW è il minimo, non il massimo (che è HIGH)
    • [2] è la seconda candela precedente, non la precedente, che è [1]  (mentre [0], o niente, è quella corrente, cioè l’ultima chiusa).
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Uscita posizione long – stop loss


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
Hunry86 @hunry86 Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by robertogozzi
4 years ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 01/29/2022
Status: Active
Attachments: No files
Logo Logo
Loading...