NexusFi: Find Your Edge


Home Menu

 





indicator within a indicator


Discussion in NinjaTrader

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




 
Search this Thread

indicator within a indicator

  #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?
Request for MACD with option to use different MAs for fa …
NinjaTrader
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
67 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
Battlestations: Show us your trading desks!
46 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #3 (permalink)
 
sam028's Avatar
 sam028 
Site Moderator
 
Posts: 3,761 since Jun 2009
Thanks Given: 3,824
Thanks Received: 4,629


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)
Follow me on Twitter 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: 3,003 since Sep 2013
Thanks Given: 2,442
Thanks Received: 5,862

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 Twitter 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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts