chiusura trade a tempo

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #198296 quote
    Giuseppe68
    Participant
    Junior

    Ciao a tutti, qualcuno sa come si può stare a mercato per un tempo prestabilito? es: TF H4, voglio stare a mercato 1 candela (4 ore), quale codice usare per chiudere il trade a tempo? ringrazio anticipatamente

    #198364 quote
    robertogozzi
    Moderator
    Legend

    Il tempo puoi stabilirlo in numero di barre (che siano Giornaliere, 4 ore o 1 minuto):

    ONCE MassimoBarre = 3    //o 3 o 25, ecc...
    IF Not OnMarket THEN
       Barre = 0
    ELSE
       Barre = Barre + 1
       IF Barre >= MassimoBarre THEN
          SELL      AT MARKET
          EXITSHORT AT MARKET
          Barre = 0
       ENDIF
    ENDIF
    IF close CROSSES OVER average[200,0](close) THEN
       BUY AT MARKET
       Barre = 0
    ELSIF close CROSSES UNDER average[200,0](close) THEN
       SELLSHORT AT MARKET
       Barre = 0
    ENDIF
    #199128 quote
    Giuseppe68
    Participant
    Junior

    Grazie per la risposta, mi scuso per lo scarso tempismo nel ringraziare

    robertogozzi thanked this post
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 trade a tempo


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Giuseppe68 @giuseppe68 Participant
Summary

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

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 08/01/2022
Status: Active
Attachments: No files
Logo Logo
Loading...