CUADRO DIALOGO EN ESTRATEGIA

All posts which do not fit into any other sections of the forum.

Moderator: admin

CUADRO DIALOGO EN ESTRATEGIA

Postby mamogo » Thu Jul 13, 2023 1:12 am

Hola, existe alguna funcion para mostrar valores de variables Local en una estrategia igual que en mql4 esta el Comment();???
gracias!!
mamogo
 
Posts: 3
Joined: Tue Jul 11, 2023 2:27 pm

Re: CUADRO DIALOGO EN ESTRATEGIA

Postby Apprentice » Thu Jul 20, 2023 2:31 pm

You can send an alert to the terminal...

terminal:alertMessage
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36478
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: CUADRO DIALOGO EN ESTRATEGIA

Postby Darla Greene » Wed Aug 16, 2023 2:56 am

¡Hola! En el lenguaje de programación Pine Script, que se utiliza para crear estrategias y estudios en TradingView, no hay una función específica equivalente a Comment() en MQL4. Sin embargo, puedes lograr un efecto similar utilizando la función label.new() para mostrar valores de variables locales o cualquier otra información en el gráfico.

Aquí tienes un ejemplo básico de cómo podrías usar label.new() para mostrar valores de variables locales en una estrategia de Pine Script:

pinescript
Copy code
//@version=4
strategy("Ejemplo de Etiquetas en Pine Script", overlay = true)

// Variables locales
var1 = close
var2 = sma(close, 20)

// Etiquetas
label.new(bar_index, var1, text = "Var1: " + tostring(var1), xloc = xloc.bar_index, yloc = yloc.price)
label.new(bar_index, var2, text = "Var2: " + tostring(var2), xloc = xloc.bar_index, yloc = yloc.price + 50)
En este ejemplo, label.new() se utiliza para crear dos etiquetas en el gráfico que muestran los valores de var1 y var2 en cada barra. Puedes personalizar la apariencia y la ubicación de las etiquetas según tus necesidades.

Recuerda que Pine Script es un lenguaje específico de TradingView, y sus características y funciones pueden diferir de MQL4 u otros lenguajes de programación. Te recomiendo consultar la documentación oficial de Pine Script en el sitio web de TradingView para obtener más información sobre las funciones y características disponibles.


Hello! In the Pine Script programming language, which is used to create strategies and studies in TradingView, there is no specific function equivalent to Comment() in MQL4. However, you can achieve a similar effect by using the label.new() function to display local variable values or other information on the chart.

Here's a basic example of how you could use label.new() to display local variable values in a Pine Script strategy:


In this example, label.new() is used to create two labels on the chart that display the values of var1 and var2 on each bar. You can customize the appearance and placement of the labels according to your needs.

Please note that Pine Script is a TradingView-specific language, and its features and functions may differ from MQL4 or other programming languages. I recommend you check the official Pine Script documentation on the TradingView website for more information on the available functions and features.
Mod apk by techzapk puede ser un destino atractivo tanto para principiantes como para jugadores experimentados en el campo de los juegos deportivos en línea.
Darla Greene
 
Posts: 1
Joined: Wed Aug 16, 2023 2:54 am

Re: CUADRO DIALOGO EN ESTRATEGIA

Postby Apprentice » Wed Aug 16, 2023 2:29 pm

We have added your request to the development list.
Development reference 714.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36478
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia


Return to General Discussions

Who is online

Users browsing this forum: No registered users and 33 guests