NexusFi: Find Your Edge


Home Menu

 





indicator within a indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one sam028 with 1 posts (0 thanks)
    2. looks_two harcesis with 1 posts (0 thanks)
    3. looks_3 maaz1598 with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 1,965 views
    2. thumb_up 0 thanks given
    3. group 4 followers
    1. forum 4 posts
    2. attach_file 5 attachments




 
Search this Thread
  #1 (permalink)
maaz1598
Sydney
 
Posts: 2 since Oct 2015
Thanks Given: 0
Thanks Received: 0

i am trying to create a strategy that uses a indicator within a indicator but i cant seem to do that in ninjatrader strategy development wizard can someone show me how? some examples to show you what i mean

example 1:
MACD indicator itself consists of two indicates within it, the smoothing fast EMA and slow EMA how to i create a strategy that buys when there is a cross of the two

example 2 :
Aroon indicator consists of two components, the aroon up and the aroon down how do i reference a cross in the two

providing pictures will really help
thanks in advance


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Bookmap Global Plus Lifetime + Lifetime Addons For Sale
Platforms and Indicators
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
June 15 Peace Odds Surge From 3.6% to 12.25% After Trump …
Prediction Markets & Event Contracts
Roland Garros Final Day: $3M on Zverev at 80.5% -- Leban …
Prediction Markets & Event Contracts
CME Raises Energy Futures Margins After Iran-War Volatil …
Commodities
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
10 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,759 since Jun 2009
Thanks Given: 3,828
Thanks Received: 4,645


Use the Plot:



Try these steps for an indicator in an indicator, but it seems it's not what you're looking for.



Success requires no deodorant! (Sun Tzu)
Reply With Quote
  #4 (permalink)
 
rleplae's Avatar
 rleplae 
Gits (Hooglede) Belgium
Legendary Market Wizard
 
Experience: Master
Platform: NinjaTrader, Proprietary,
Broker: Ninjabrokerage/IQfeed + Synthetic datafeed
Trading: 6A, 6B, 6C, 6E, 6J, 6S, ES, NQ, YM, AEX, CL, NG, ZB, ZN, ZC, ZS, GC
Posts: 2,947 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,855

This is how you would do that in the source code :

 
Code
myCCI = WoodiesCCI(2, 5, 50, 34, 25, 6, 60, 100, 2);
myCCIEMA34 = EMA (myCCI,34);

The first line creates a CCI, the second line creates an average 34 (ema) on the woodies, to smoothen it.

This would go in the Initialiaze () of your strategy

 
Code
protected override void Initialize()
        {
          myCCI = WoodiesCCI(2, 5, 50, 34, 25, 6, 60, 100, 2);
          myCCIEMA34 = EMA (myCCI,34);  // added a 34 EMA on CCI
         }

You could then start using this in


 
Code
protected override void OnBarUpdate()
{
         if (myCCI[0] < myCCIEMA34[0] )
        {
           // CCI is below it's 34 average
           // do something here...
         }
}
hope this helps you..
wish you good trading


Follow me on X Visit my NexusFi Trade Journal Reply With Quote
  #5 (permalink)
 harcesis 
Prague/Czech Republic
 
Experience: Intermediate
Platform: Ninjatrader
Trading: YM, RTY
Posts: 13 since Sep 2011
Thanks Given: 2
Thanks Received: 0

Hello,

is there somebody who can have a look on the attached indicator. It is compiled but from strange reason it is not taking value correctly.

I am not programer so I have only limited knowledge of C++.

I managed to change calculation of the CC and use it in different indicator. Basicly some sort of smoothing. The idea is to change color when CCI is going up or down if it exceed value set.

Idealy to have same color in background until set delta will indicate change and have arrow in input series as possible entry (this will be the next programing nut )

I tried some modifications but I am running in the circules

Your help is very appreciated in advance.

Thank you

Miroslav


Attached Files
Elite Membership required to download: CCIMA.cs
Elite Membership required to download: ccipokus2.cs
Reply With Quote




Last Updated on May 6, 2016


© 2026 NexusFi®, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Downloads - Top
no new posts