operazione in percentuale

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #155220 quote
    emanuele81emanuele81
    Participant
    Senior

    Buongiorno a tutti, vorrei porre una domanda è possibile chiudere un operazione automatica se una candela supera al rialzo oppure al ribasso una determinata percentuale.

    Mi spiego meglio sul grafico a 5 minuti, se la chiusura della candela è superiore oppure inferiore dello 0,5 rispetto all’apertura, l’operazione viene chiusa.

    Naturalmente operazione long, chiusa se la chisura della candela è negativa per lo short il contrario.

    Grazie

    #155290 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Eccolo (non l’ho provato):

    Bullish = close > open
    Bearish = close < open
    //chiudere un'operazione LONG  quando si verifica una candela contraria con chiusura < allo 0.5% dell'apertura
    IF LongOnMarket  AND Bearish AND (close < (open * 0.95)) THEN
       SELL AT MARKET
    ENDIF
    //chiudere un'operazione SHORT quando si verifica una candela contraria con chiusura > allo 0.5% dell'apertura
    IF ShortOnMarket AND Bullish AND (close > (open * 1.05)) THEN
       EXITSHORT AT MARKET
    ENDIF
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

operazione in percentuale


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
emanuele81 @emanuele81 Participant
Summary

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

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