Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator displacement in Strategy...

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

    Indicator displacement in Strategy...

    I'm calling an indicator in a strategy. I would like to "displace" that indicator for my strategy's logic. Is this doable?

    #2
    Hello,

    I wanted to define the meaning of "calling" and "displace" in this statement.

    Are you adding the indicator visually using the strategy and want to Displace the indicator visually?
    Or are you asking how to displace the actual data, potentially using a BarsAgo as an example?

    Can you clarify which you are trying please?


    I look forward to being of further assistance.

    Comment


      #3
      Actually, I *may* add it visually in the strategy, but right now just accessing the data. Can you show me an example of both ways?
      Last edited by funk101; 04-21-2016, 09:20 AM. Reason: Clarify

      Comment


        #4
        Hello,

        Visually, you would need to control the Displacement of the indicator you Add();

        Code:
        private SMA mySma ;
        
        ...
        
        
        
        else if (State == State.Configure)
        {
        	mySma= SMA(12);
        	AddChartIndicator(mySma);
        				
        } else if(State == State.Historical){
        	mySma.Displacement = 25;
        }
        For the data, are you just referring to a bars ago? I am not certain on what you mean by displace the data.
        For example if you wanted to use a past value on the current bar it would be Close[10], is this what you mean by displace?

        I look forward to being of further assistance.
        Last edited by NinjaTrader_Jesse; 04-21-2016, 10:09 AM.

        Comment


          #5
          Actually, I'm talking NT 8 not 7 and i'm using AddChartIndicator()
          Last edited by funk101; 04-21-2016, 09:56 AM. Reason: Clarify

          Comment


            #6
            Hello,

            That was my mistake, I have updated the sample.

            I look forward to being of further assistance.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Mindset, Today, 06:46 AM
            0 responses
            8 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, Yesterday, 05:21 PM
            0 responses
            12 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            15 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            82 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            47 views
            0 likes
            Last Post PaulMohn  
            Working...
            X