drawImageRelative()

eSignal EFS 2

drawImageRelative()

Top  Previous  Next

 

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

 

The drawImageRelative function allows you to draw image objects at any location on your chart. Any image object created with drawImageRelative will 'stick' to the location where it was originally anchored. So, a image object originally created at a bar index of -10 will be at a bar index of -20 after 10 new bars come in.

 

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

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

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