Comando Drawline

  • This topic has 7 replies, 3 voices, and was last updated 6 years ago by avatarAVT.
Viewing 8 posts - 1 through 8 (of 8 total)
  • #46956

    Buongiorno a tutti,

    avrei bisogno di qualche chiarimento relativo al comando drawline: se ho capito bene funziona in questo modo:

    drawline(x1, y1, x2, y2), dove x1 ed x2 sono le ascisse dei punti di inizio e fine del segmento e y1 ed y2 le relative ordinate.

    Domanda: x1 ed x2 sono sempre dei riferimenti tipo “barindex”? E’ possibile in qualche modo renderli assoluti, ossia invariabili nel tempo? (vorrei scrivere il codice equivalente ad un segmento disegnato a mano dall’utente).

    Se utilizzo numeri assoluti, fanno sempre riferimento al numero di candele caricate dal sistema; ad esempio su TF giornaliero, vorrei dar disegnare il segmento da un determinato giorno ad un altro.

    Grazie a tutti e complimenti per l’ottimo lavoro.

    Saluti

    Marco

    #46965

    E ‘giusto, le coordinate X sono barindex, mentre quelle Y sono nel prezzo.
    Per ottenere le stesse coordinate in molti tempi differenti, dovrai cercare e trovare l’esatto barindex, non c’è altra possibilità.

    #46967

    Hi All,

    I’d need some advice on DRAWLINE command; if I correctly understood it works as follows:

    DRAWLINE(x1, y1, x2, y2), with x1 and x2 abscissas of starting and end point of segment, while y1 and y2 are the relevant ordinates.

    Question: x1 and x2 are always barindex-type references? Can they be made absolute, i. e. non varying with time? (I’d like to write the code equivalent to manually drawing a segment on a price chart).

    If I use absolute numbers, they always refer to the number of loaded candlesticks; for instance, on daily TF, I’d like to write the code to draw a segment from one specific day to another.

    Thank you all and compliments for the excellent job done here.

    Kind regards,

    Marco

    #46968

    barindex of a specific candlestick changes with time, therefore it does not seem possible to draw a static segment; is it correct?

    #46969

    by the way, thanks a lot Nicolas for your prompt answer.

    your code is always extremely interesting

    marco

    #47392
    AVT

    IT: Solo un’idea: puoi rendere il valore assoluto entro il tempo (significa che il venerdì 6 00 rimarrà sempre allo stesso punto, non importa quale sia il barindex). Quindi fare qualcosa come ‘se venerdì 6 00 startpoint’ e ‘se venerdì 9 00 enpdoint’.

    EN: Just an idea: you can make the value absolute by time (means: Friday 6:00 will always stay at the same point, no matter what barindex that is). Then do something like ‘if Friday 6:00 startpoint’ and ‘if Friday 9:00 enpdoint’.

    #47461

    Excellent idea! Can you help me a bit more? Drawlie foresses 2 barindex values as input, therefore how can they be changed in dates?

    Thanks a lot,

    Marco

    #47660
    AVT

    IT: Una costruzione come questo dovrebbe funzionare (per il punto di partenza)
    EN: A construction like this should work (for the starting point)

    IT: Ora sappiamo quando è accaduto e quale prezzo abbiamo avuto, fissato nelle nostre AbsoluteVariables.
    Durante il disegno usiamo un secondo IF a seconda del tempo che abbiamo trovato

    EN: Now we know when it occurred and what price we had, fixed in our AbsoluteVariables.
    When drawing we use a second IF depending on the time we found

    IT: non testato EN: untested 🙂

     

     

Viewing 8 posts - 1 through 8 (of 8 total)
Similar topics:

Create your free account now and post your request to benefit from the help of the community
Register or Login