Call user-defined Indicator from Strategy/ProOrder

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #260275 quote
    Brownie
    Participant
    New

    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"
    



    #260276 quote
    Nicolas
    Keymaster
    Master

    It doesn’t work like that 🙂

    CALL of indicators into a strategy code just ignore all drawing instructions. If you want the indicator to plot on the chart, just apply it onto the price.

    #260287 quote
    Brownie
    Participant
    New

    thank you.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Call user-defined Indicator from Strategy/ProOrder


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Brownie @brownie Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Brownie
2 weeks, 4 days ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 04/16/2026
Status: Active
Attachments: No files
Logo Logo
Loading...