Action: perform Object List "Show" function, frame (locate) desired object in chart
I have many clients that use MT4 both as an analysis platform and a trade debrief platform.
I have created a script that allows windows of a Symbol() to be
synced to the time frame. This allows clients to debrief a trade made
on one time frame and see how it was affected by lower time frames. To
increase a client ability to debrief their trades we have thought them
to leverage the strategy tester to play back their trade per tic. This
has been quite useful in combination with the chart time sync script to
allow the client to see their trade progress on several time frames.
If there were a ObjectShow( string name) a new debrief or back test
script would easily be able to sync several charts to the strategy
tester thus allowing for easy referencing of a trades progress relative
to different time frames.
Secondarily would be the enhancement to the ObjectShow() API for
time position, currently ObjectListShow will frame the chart to the
left margin. It would be nice to be able to frame the bars to the right
boarder to more closely emulate new bars.
NOTE: it is realized that only the strategy tester would be in tic
time, "whole" new bars of companion time frames would show appear as
the strategy tester moves from bar to bar.
Algorithm pseudo code:
Strategy tester:
Set global variables for Symbol()-timeline to bar 0
if (newBar) {
now=TimeCurrent()
ObjectSet("local-timeline", OBJ_VLINE, 0, now, 0)
WriteGlobal(now,semaphore)
}
Companion Chart:
If (local-timeline != Global Symbol-timeline) {
now=GetGlobal(Global Symbol()-timeline)
ObjectSet("local-timeline", OBJ_VLINE, 0, now, 0)
ObjectShow("local-timeline")
}
Every new bar that is created in the strategy tester
writes CurrentTime() to the global variable space. The companion charts
detect the difference in their local-timeline and the global timeline
and set their timeline to the global variable thus syncing their chart
to the the strategy tester. This essentially allows the charts to track
each other in relative to strategy tester time.
[ ObjectShow(name,position) would allow the charts to ideally sync
to right margin rather than default left margin so that they appear to
be pseudo new candles. ]
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Request MQL4 API ObjectShow( string name);
Action: perform Object List "Show" function, frame (locate) desired object in chart
I have many clients that use MT4 both as an analysis platform and a trade debrief platform.
I have created a script that allows windows of a Symbol() to be synced to the time frame. This allows clients to debrief a trade made on one time frame and see how it was affected by lower time frames. To increase a client ability to debrief their trades we have thought them to leverage the strategy tester to play back their trade per tic. This has been quite useful in combination with the chart time sync script to allow the client to see their trade progress on several time frames.
If there were a ObjectShow( string name) a new debrief or back test script would easily be able to sync several charts to the strategy tester thus allowing for easy referencing of a trades progress relative to different time frames.
Secondarily would be the enhancement to the ObjectShow() API for time position, currently ObjectListShow will frame the chart to the left margin. It would be nice to be able to frame the bars to the right boarder to more closely emulate new bars.
NOTE: it is realized that only the strategy tester would be in tic time, "whole" new bars of companion time frames would show appear as the strategy tester moves from bar to bar.
Algorithm pseudo code:
Strategy tester:
Companion Chart:
Every new bar that is created in the strategy tester writes CurrentTime() to the global variable space. The companion charts detect the difference in their local-timeline and the global timeline and set their timeline to the global variable thus syncing their chart to the the strategy tester. This essentially allows the charts to track each other in relative to strategy tester time.
[ ObjectShow(name,position) would allow the charts to ideally sync to right margin rather than default left margin so that they appear to be pseudo new candles. ]
Regards,
John McGlaughlin