NexusFi: Find Your Edge


Home Menu

 





Complete noob programming MTF and nested indicator


Discussion in Traders Hideout

Updated
    1. trending_up 3,285 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Complete noob programming MTF and nested indicator

  #1 (permalink)
 nirajkrishna 
McKinney, TX
 
Experience: Intermediate
Platform: Ninjatrader, ThinkorSwim
Broker: IB
Trading: Equities
Posts: 57 since Nov 2009
Thanks Given: 5
Thanks Received: 88

I am trying to program a multi time frame strategy, and I just figured out how to do it. I know it is child's play to many of you. But then I thought I might show off a little and try a random indicator within an indicator with the MTF. And keep in mind I have no clue what I am doing.... My little random example is not paying attention to all of my criteria. I dont know why? I may have a misplaced curly brace or my syntax is just wrong. I am not sure. I know this is a stupid calculation, but I am just trying to make sure I can do it if I needed to. Here is what I was trying. Any help would be great!

 
Code
                            
 protected override void OnBarUpdate()
        {
            
// OnBarUpdate() will be called on incoming tick events on all Bars objects added to the strategy
            // We only want to process events on our primary Bars object (index = 0) which is set when adding
            // the strategy to a chart
            
if (BarsInProgress != 0)
                return;
            
// Condition set 1
            
            // Checks  if the 6 ADXVMA of the Stochastic RSI 50 is greater than the 21 ADXVMA of the Stochastic RSI 50 on the second and third series of Charts
            
if (ADXVMA(StochRSI(BarsArray[1],50),6).ADXVMAPlot[0] > ADXVMA(StochRSI(BarsArray[1],500),21).ADXVMAPlot[0]&&
                
ADXVMA(StochRSI(BarsArray[2],50),6).ADXVMAPlot[0] > ADXVMA(StochRSI(BarsArray[2],50),21).ADXVMAPlot[0]);
            
           
            {     
                if (
CrossAbove(StochasticMomentumIndex(3412010).SMIStochasticMomentumIndex(3412010).SMIEMA1)&&
                    
ADXVMA(StochRSI(50),6).ADXVMAPlot[0] > ADXVMA(StochRSI(50),21).ADXVMAPlot[0]);
                
EnterLong(300000"SMILong");
            }
        } 

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
Build trailing stop for micro index(s)
Psychology and Money Management
Better Renko Gaps
The Elite Circle
Deepmoney LLM
Elite Quantitative GenAI/LLM
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
 
  #3 (permalink)
 nirajkrishna 
McKinney, TX
 
Experience: Intermediate
Platform: Ninjatrader, ThinkorSwim
Broker: IB
Trading: Equities
Posts: 57 since Nov 2009
Thanks Given: 5
Thanks Received: 88


Sorry I guess it is working. It just didnt look like it on my charts. Sorry to anyone who wasted their time looking at this.

Started this thread Reply With Quote




Last Updated on March 26, 2011


© 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