Candela Ultimo ordine aperto

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #170598 quote
    byT77
    Participant
    New

    Salve a tutti.
    Necessito del vostro cortese aiuto.
    Come posso identificare attraverso il codice di programmazione, la Candela con l’ultimo ordine aperto indipendentemente se short o long.

    ex:

    CandleLastOrder = ???

    Ringrazio anticipatamente.

    Candle.jpg Candle.jpg
    #170611 quote
    robertogozzi
    Moderator
    Master

    Ho spostato il topic da ProBuilder a ProOrder perché riguarda strategie, non indicatori.

    Per favore utilizzare i forum corretti, come indicato qui sotto in giallo, per rendere più agevole la ricerca delle informazioni.

    Grazie 🙂

    #170612 quote
    byT77
    Participant
    New

    Chiedo venia. E’ la prima volta che mi rivolgo al Forum.
    Grazie mille.
    Spero di ricevere la risposta al più presto.

    Buona giornata

    #170613 quote
    robertogozzi
    Moderator
    Master

    Non c’è un’istruzione specifica, quindi occorre fare alcune verifiche con IF…ENDIF:

    Once CandleLastOrder = 0
    If (OnMarket and Not OnMarket[1])  or ((Not OnMarket and Not OnMarket[1]) and (StrategyProfit <> StrategyProfit[1])) or (LongOnMarket and ShortOnMarket[1]) or (LongOnMarket[1] and ShortOnMarket) then
       CandleLastOrder = BarIndex
    Endif

    Non l’ho provato.

    #170614 quote
    byT77
    Participant
    New

    Farò qualche test.
    Al momento la ringrazio davvero tanto per il supporto.
    Nel caso il codice richiederà qualche variazione, lo riporterò qui nel forum.

    #170782 quote
    byT77
    Participant
    New

    Ho testato il codice, sembra che riesca ad identificare la candela. Sarebbe così gentile da includere anche il Volume della Candela “CandleLastOrder”?

    Grazie in anticipo

    #170783 quote
    robertogozzi
    Moderator
    Master

    Il Volume, come Close, High ecc… puoi trovarlo usando CandleLastOrder per trovare l’indice della candela di riferimento:

    MyVolume = Volume[BarIndex - CandleLastOrder]
    #170785 quote
    byT77
    Participant
    New

    Fulmineo!!!

    Grazie mille.

    #170786 quote
    robertogozzi
    Moderator
    Master

    Fulmineo perché ho il cellulare in mano mentre guardo la MotoGP in TV 😂

    #170787 quote
    byT77
    Participant
    New

    Ahahahhahaha… TOP!

Viewing 10 posts - 1 through 10 (of 10 total)
  • You must be logged in to reply to this topic.

Candela Ultimo ordine aperto


ProOrder: Trading Automatico & Backtesting

New Reply
Author
author-avatar
byT77 @byt77 Participant
Summary

This topic contains 9 replies,
has 2 voices, and was last updated by byT77
4 years, 8 months ago.

Topic Details
Forum: ProOrder: Trading Automatico & Backtesting
Language: Italian
Started: 05/27/2021
Status: Active
Attachments: 1 files
Logo Logo
Loading...