Hello my friends,
i am testing different ways, but i don’t get the result i wish.
The Strategy calls a user-defined Indicator (UDI). The UDI should draw at a given BarIndex Text and Points.
But it don’t works.
Proably anybody knows the solution.
Thanks for support.
//Code of My Strategy
TimeFrame(1 minute)
If BarIndex = 15000 then
RC = Call "MyIndicator" [BarIndex]
Print RC as "RC" // the List contains the successfull Code from MyIndicator 112
Endif
//Code of MyIndicator
//Parm1 defined as Parameter[1]
DEFPARAM DRAWONLASTBARONLY = false
RC = 4
If BarIndex = Parm1 // >>>> with no Result on Screen
DRAWTEXT("Hello", barindex, high - 50,SansSerif,Bold,14) COLOURED("blue")
DRAWPOINT(barindex, high - 100, 1) coloured("gray")
RC = 112
Endif
If BarIndex = Parm1 // >>>> with no Result on Screen
DRAWTEXT("Hello", Parm1, high - 50,SansSerif,Bold,14) COLOURED("blue")
DRAWPOINT(Parm1, high - 100, 1) coloured("gray")
RC = 112
Endif
If BarIndex = Parm1 // >>>> Have Result on Screen: drawed on 50.000
DRAWTEXT("Hello", Parm1 + 50000, high - 50,SansSerif,Bold,14) COLOURED("blue")
DRAWPOINT(Parm1 + 50000, high - 100, 1) coloured("gray")
RC = 112
Endif
If BarIndex = Parm1 // >>>> Have Result on Screen: drawed on 50.000
DRAWTEXT("Hello", 50000, high - 50,SansSerif,Bold,14) COLOURED("blue")
DRAWPOINT(50000, high - 100, 1) coloured("gray")
RC = 112
Endif
If BarIndex = Parm1 // >>>> Have Result on Screen: not working, like described in the documentation
x1 = 50000
DRAWTEXT("Hello", x1, high - 50,SansSerif,Bold,14) COLOURED("blue")
DRAWPOINT(x1, high - 100, 1) coloured("gray")
RC = 112
Endif
Return RC as "RC"