Página 1 de 1

MensagemEnviado: 13/2/2011 12:34
por Rics
Não que eu perceba muito de MQL, mas pela descrição do problema tinha ficado com a idéia de que era mesmo isso. Como não tinha acesso ao código para confirmar, achei melhor deixar uns exemplos que, por comparação, mais rapidamente ajudam a identificar o erro.

Ainda bem que ajudou. Estas coisas só não acontecem a quem nunca programa...

MensagemEnviado: 13/2/2011 11:56
por bmiguelmf
Antes de mais obrigado!

Até me sinto envergonhado em dizer que a solução esteve sempre à minha frente :P era o parametro nome que eu não estava a mudar!

Parameters

chart_id

[in] Chart identifier. 0 means the current chart.

name

[in] Name of the object. The name must be unique within a chart, including its subwindows.

type

[in] Object type. The value can be one of the values of the ENUM_OBJECT enumeration.

nwin

[in] Number of the chart subwindow. 0 means the main chart window. The specified subwindow must exist, otherwise the function returns false.

time1

[in] The time coordinate of the first anchor.

price1

[in] The price coordinate of the first anchor point.

timeN=0

[in] The time coordinate of the N-th anchor point.

priceN=0

[in] The price coordinate of the N-th anchor point.

time30=0

[in] The time coordinate of the thirtieth anchor point.

price30=0

[in] The price coordinate of the thirtieth anchor point.

MensagemEnviado: 13/2/2011 7:25
por Rics
Bem, para terminar deixo um artigo tutorial que explica, passo a passo, como fazer exactamente isso:

http://articles.mql4.com/536

MensagemEnviado: 13/2/2011 7:20
por Rics
Deixo dois exemplos...


Um simples:
http://forum.mql4.com/18411


E outro menos simples:
http://www.mql5.com/en/articles/26

OT - Metaquotes 5

MensagemEnviado: 12/2/2011 19:41
por bmiguelmf
Estou a iniciar-me nesta linguagem, já tinha experiência com outras linguagens a aprendizagem não está a ser dificil mas tenho uma dúvida que me está a dar cabelos brancos e ninguém me sabe dizer a solução.

Pretendo desenhar várias trendlines no grafico.

utilizo o método ObjectCreate, o problema é que assim que chamo o método uma segunda vez a trendline que tinha sido desenhada no primeiro call desaparece e fica apenas a segunda e assim sucessivamente...

Soluções?

Abraços!