To MetaQuotes: The Future Bar.

 
I have noticed that the MT4 can manually insert objects and plot object trend lines (ray option) into the future (-i) bar and can open "Pending Orders"
However, unless I am missing something, the MT4 has no ability to read "ray" value at the future time Time(-i).
It would be good idea if you would implement ability to read such value at specific future bar.
In fact the "Shift end of the chart from right border" allows to look into a future and manually insert objects beyond this line.
It would be good to see, by the system, deviation between actual and predicted chart.

The purpose is to be able to generate an "error signal" which would be used by the MT4, similarly as in the "phase lock loop" to make necessary adjustments on the fly .
Think about it.

-Stan
 
I agree we need to be able to read data from trendlines...past, present, and future data.

If MQ is not updating the client, what are they doing all day?
 
Well, I'm not sure if i understand what you mean, computing the future value of a trend line should not be too hard. Just pick the two points (price/time) from the object (p1/t1, p2/t2) via ObjectGet and then get to your desired point p3/t3 through linear regression.

slope = (p1-p2)/(t1-t2)
p3= (t1-t3)*slope;



Markus
 

Well, I'm not sure if i understand what you mean, computing the future value of a trend line should not be too hard. Just pick the two points (price/time) from the object (p1/t1, p2/t2) via ObjectGet and then get to your desired point p3/t3 through linear regression.

slope = (p1-p2)/(t1-t2)
p3= (t1-t3)*slope;



Markus

Hi Markus,

Yes, that is possible, however you cannot plot and display the p3 since you cannot address t3.

Please notice that you can set object manually in the future from the Insert menu and it will show on the Objects List but you cannot do it by the system since you cannot point to future bar by Time(-i).... etc.

To be consistent, the MT4 should have (-i) bar shifting.

I would like to also see in the Insert menu Sine Function which would project to future to predict change of the trend in the future. Linear function can not do it.

Yes, I know you can calculate it but same plotting, displaying and reading problem exists as above, because you cannot set (-i) bar.
 
I don't know if that helps but I have inserted text fields in the "future" shift area (labels for hline objects), so maybe you can use that instead. These at least seem to accept future times (calculated as "Time[0] - n*Period" as the time variable for the object).


Markus
 

I don't know if that helps but I have inserted text fields in the "future" shift area (labels for hline objects), so maybe you can use that instead. These at least seem to accept future times (calculated as "Time[0] - n*Period" as the time variable for the object).


Markus


Thanks Markus,

It works just fine in the future.
I was confusing "i" bar shift with the actual time and on top of it I was calling ObjectsDeleteAll(0, OBJ_TREND) in my "int deinit()" so everything got erased during my testing.
Again I must state that I am impressed with MT4 platform.
Kudos to MetaQuotes.
 
Glad to have been of help.


Markus
Reason: