objects on chart and price level

 

I have found that there is no way I can interact with the chart itself, so I thought I might use
objectset(an arrow possibly) to set an object on the chart, and read the price at the object using objectget(OBJPROP_PRICE1) etc.. (some coding is missing for clarity)
but I get "0"...
is there anyway to set an object in the corners of a chart and get the price at which it resides?
(by the way, when you set all four corners, you really don't get the corners, you get a square in the middle of the chart, but this is good enough for me)
or perhaps someone knows how to get the chart scale, or top and bottom price of chart from within an ea.

ps... just because the championship has started, don't lets quit trying to program these ea's hahaha.

 
if you want to fill a rectangle that fills the whole chart you can play with functions firstvisiblebar and barsperwindow
set prices that are off the chart such as 0 and 3 and set time to firstvisiblebar+1 (use iBarShift) and firstvisiblebar-barsperwindow-1.
this way rect will completely fill the window.

to set rectangle kind of at corners use highest and lowest with range of firstvisiblebar and barsperwindow combination.
left-upper corner (firstvisiblebar time,highest)
right-upper corner (firstvisiblebar-barsperwindow,highest)
and so on...

I haven't tried it myself, so it's a suggestion.
 
excellent suggestion.. however I get the same results with running through the visible bars and getting the high and low of the currency... this gives me the upper and lower of the visible window, which i think is what you are getting.. in order to get the one you first talked about , setting prices off the chart would in fact put the marker or corner of the rect out of sight.. I am really trying to get the price at the top of the chart and at the bottom of the chart. so this would not do it.. hmmmmm