drawImageAbsolute()

ICE Data Services -

drawImageAbsolute()
Previous  Top  Next

drawImageAbsolute( barIndex, yValue, image, url, Flags [, tagID] )

The drawImageAbsolute function allows you to draw image objects at any location on your chart. Any image object created with drawImageAbsolute will remain at its designated relative offset from the most current bar. So, a image object drawn with drawShapeAbsolute at a bar index of -10 will always remain 10 bars back from the most current bar.

Parameters

barIndex
the bar index where the image object will be anchored (x-axis)
yValue
the series value where the image object will be anchored (y-axis)
image
see Image Objects below (must be a string)
url
a url to be launched if image is clicked, or null if not used
Flags
see Image Flags below
tagID
optional. a unique identifier for this image object or null



Image Objects

SystemHappyFace
SystemNotHappy
SystemSadFace
SystemReallyHappyFace
SystemCheckMarkRed
SystemCheckMarkGreen
SystemCheckMarkYellow
SystemCheckMarkBlue
SystemCheckMarkBlack
SystemCheckMarkWhite
SystemLightOn
SystemLightOff
SystemCircleRed
SystemCircleGreen
SystemCircleYellow
SystemCircleBlue
SystemCircleBlack
SystemCircleWhite
SystemCircleButtonRed
SystemCircleButtonGreen
SystemCircleButtonYellow
SystemCircleButtonBlue
SystemCircleButtonBlack
SystemCircleButtonWhite
SystemQuestionRed
SystemQuestionGreen
SystemQuestionYellow
SystemQuestionBlue
SystemQuestionBlack
SystemQuestionWhite
SystemExclamationRed
SystemExclamationGreen
SystemExclamationYellow
SystemExclamationBlue
SystemExclamationBlack
SystemExclamationWhite
SystemInfoRed
SystemInfoGreen
SystemInfoYellow
SystemInfoBlue
SystemInfoBlack
SystemInfoWhite
SystemStopRed
SystemStopGreen
SystemStopYellow
SystemStopBlue
SystemStopBlack
SystemStopWhite
SystemLightning
SystemSnowflake
SystemSun


Image Flags

Image.LEFT
align the image to the left
Image.RIGHT
align the image to the right
Image.TOP
align the image to the top
Image.BOTTOM
align the image to the bottom
Image.ONTOP
draw the image on top of the study
Note: Image flags can be ORed together to combine various attributes (e.g., Image.ONTOP | Image.LEFT )


Usage

   //draw a happy face over the high of the bar 5 bars back and color it red. Since we are using
   //drawShapeAbsolute, the happy face will always remain at an offset of 5 bars back

   drawImageAbsolute( -
5, high(-5), "SystemHappyFace", null, Image.TOP | Image.ONTOP );


Notes

It’s possible to define mouse-button handler function for figures created by drawImageAbsolute. To do this you should set the parameter URL as 'EFS:functionName', where functionName is the caption of handler, which should be defined in script.
 
Note, starting with version 11.1 all mouse functions require the use of the Shift key when called from the chart. This change was done to avoid conflicts between EFS and chart mouse events (such as right clicking or double clicking) without compromising any backwards compatability.