Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Performance - Calling Indicators into new Indicator v rewriting all into a new Indic

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Performance - Calling Indicators into new Indicator v rewriting all into a new Indic

    Hi Guys

    I am writing an Entry / Exit indicator for auto trading. I want to plot the results so I can see it plot historically and fine tune it rather than use Strategy Bulider and optimise. I am calling in the recommended way about 10 of my own indicators for signals. What i noticed is the 10 indicators plot in a few seconds when on the chart but the new indicator takes about 10 x or more as long to plot. That is even with an an added series commented out, which does not significantly affect the time anyway. Obviously I would be fine tuning it before going to live trading from a VPS so my PC system is immaterial but is running 4 cores anyway.

    public class rgEntryExit : Indicator
    {
    private myIndicator myIndicator1;
    else if (State == State.DataLoaded)
    {
    myIndicator1 = myIndicator1(Close[0],Parameters); (or Closes for Added Series)
    protected override void OnBarUpdate()
    {
    myIndicator1.PlotValue
    do something


    1. Is this a known issue as it means a totally different way I need to write my Entry / Exit indicator

    2. I am just using for testing at the moment so time means nothing but I am wondering if it is more optimal for live trading if I should rewrite all the indicators into a single combined indicator. It also means I am removing all the plots I only really need for testing.

    #2
    Hello Ray12345,

    From the small sample I couldn't really say what may be the problem, that would be the expected way to call indicators. If you are not certain that you have the general indicator syntax right you can use the strategy builder to create a condition using the indicator and then click View Code.

    If you find that calling 1 specific indicator causes a long load time that would be a situation where we would need more details like the timeframes being used and general settings of the strategy and indicator. Indicators assume the host settings for Calculate so if you use OnBarClose when applying the indicator alone and then OnEachTick with that strategy that would be a case where the load time would be increased.



    I look forward to being of further assistance.

    Comment


      #3
      Hi Jesse
      Thanks. I am calling a lot of indicators into one indicator and have commented out everything leaving just the called indicators and I noticed even then that there is a big performance drop compared to having all the indicators on another chart. I have not had problems with calling just a couple of indicators before. I just want to know if there is any known performance drop for calling indicators versus rewriting all the indicators into the one indicator. This would affect how the indicator is written so I would prefer to know in advance before I need to redo everything. I dont care which way I write it but just wanted to know if calling many indicators into one new indicator has known performance issues. All indicators are set up on the close but have a lot of calculations involved. I am not talking about calling just a couple of EMA's. Overall calculation time becomes very significant if there is a difference. I was just looking for confirmation one way or another.

      Comment


        #4
        Hello Ray12345,

        With the given details I couldn't really provide any expectations on performance. Its expected that you can call indicators from either other indicators or strategies. If you have isolated the problem to a specific piece of code we could try to go over just that part to better understand why that may take longer to load. You could also try re writing it to see how it performs as a single script.

        I look forward to being of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        577 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X