Trade line as in tester.

 
Hi everyone!
                 One question, is there any command or function to be able to get a line from the starting point to the closing point of a trade like the ones generated by the mql4 strategy tester?
I would really appreciate it, because I want to create an indicator that generates a photo when opening an operation and another photo when closing it, but having previously created this line and the starting and closing points.
 
Manuel de los Heros Soler:
Hi everyone!
                 One question, is there any command or function to be able to get a line from the starting point to the closing point of a trade like the ones generated by the mql4 strategy tester?
I would really appreciate it, because I want to create an indicator that generates a photo when opening an operation and another photo when closing it, but having previously created this line and the starting and closing points.

Not one command/function; it's just a trendline with STYLE_DOT and RAY/RAY_RIGHT disabled, along with 2-4 arrow objects (entry, exit, and stoploss + takeprofit if your order had those set).

You can write a function that recreates it, though.

 
Alexander Martinez #:

Ni un comando/función; es solo una línea de tendencia con STYLE_DOT y RAY/RAY_RIGHT deshabilitados, junto con 2-4 objetos de flecha (entrada, salida y stoploss + takeprofit si su orden los tenía configurados).

Sin embargo, puede escribir una función que lo recree.

OKAY!
       Thank you very much Alexander, so I have to investigate how to obtain the data for the time and price of entry and exit. I'm going to try it, if you don't try, you don't learn.

By the way, is there any way to detect when a trade is opened or closed automatically, or is due from "Void Timer" to perform an order tracking loop.



All the best

 
Manuel de los Heros Soler #:

OKAY!
       Thank you very much Alexander, so I have to investigate how to obtain the data for the time and price of entry and exit. I'm going to try it, if you don't try, you don't learn.

By the way, is there any way to detect when a trade is opened or closed automatically, or is due from "Void Timer" to perform an order tracking loop.



All the best

No problem. 👍

To answer your question: not in MT4. Only MT5 has this functionality.

In MT4, you must keep track of the open orders manually.

 
Alexander Martinez #:

No problem. 👍

To answer your question: not in MT4. Only MT5 has this functionality.

In MT4, you must keep track of the open orders manually.

OKAY! Thank you very much. Unfortunately, my broker only works with MT4.