Display Daily SMA within Renko chart - NinjaTrader Programming | futures io social day trading
futures io futures trading


Display Daily SMA within Renko chart
Updated: Views / Replies:1,241 / 6
Created: by foodchain Attachments:1

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Display Daily SMA within Renko chart

  #1 (permalink)
Elite Member
oakland
 
Futures Experience: Intermediate
Platform: ninjatrader, thinkorswim
Broker/Data: IB
Favorite Futures: GC, CL, ES, ZF, ZN, DX, 6E
 
Posts: 15 since May 2010
Thanks: 8 given, 0 received

Display Daily SMA within Renko chart

The code below works fine with minutes chart that will display the daily 20 SMA with no problem.
Unfortunately, once i switch to Renko or Range chart, it's gone. Anyone can help, please.

 
Code
                            
protected override void Initialize()

        {
            
Add(PeriodType.Day1);
            
Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line"Plot0"));
            
Overlay                true;
        }

        
/// <summary>
        /// Called on each bar update event (incoming tick)
        /// </summary>
        
protected override void OnBarUpdate()
        {
            
// Use this method for calculating your indicator values. Assign a value to each
            // plot below by replacing 'Close[0]' with your own formula.
            
            
if (CurrentBar 30) return;
            
            if (
BarsInProgress == 0){
                
Plot0.Set(SMA(BarsArray[1],20)[0]);
            }
        } 

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Market Wizard
virginia
 
Futures Experience: Intermediate
Platform: ninja
Favorite Futures: ES
 
cory's Avatar
 
Posts: 5,220 since Jun 2009
Thanks: 628 given, 6,318 received
Forum Reputation: Legendary


try this sample code

Attached Files
Register to download File Type: cs AddMA.cs (6.3 KB, 13 views)
Reply With Quote
The following user says Thank You to cory for this post:
 
  #4 (permalink)
Elite Member
oakland
 
Futures Experience: Intermediate
Platform: ninjatrader, thinkorswim
Broker/Data: IB
Favorite Futures: GC, CL, ES, ZF, ZN, DX, 6E
 
Posts: 15 since May 2010
Thanks: 8 given, 0 received


cory View Post
try this sample code

Cory, your code displays the 20 SMA of the Renko bar.
What I want is to display the "DAILY 20 SMA" within a 4 Renko chart.

Thanks pal

Reply With Quote
 
  #5 (permalink)
Elite Member
las vegas
 
Futures Experience: Intermediate
Platform: Sierra Chart
Broker/Data: Velocity/IB
Favorite Futures: 6E
 
Posts: 1,147 since Feb 2010
Thanks: 304 given, 836 received

I think I've done it before like

 
Code
protected override void Initialize()

        {

            Add(PeriodType.Day, 1);

            Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));

            Overlay                = true;

        }



        /// <summary>

        /// Called on each bar update event (incoming tick)

        /// </summary>

        protected override void OnBarUpdate()

        {

            // Use this method for calculating your indicator values. Assign a value to each

            // plot below by replacing 'Close[0]' with your own formula.

            

            if (CurrentBar < 30) return;

            

            if (BarsInProgress == 0){

                Plot0.Set(SimpleMA);

            }

            if (BarsInProgress == 1){

                double SimpleMA = SMA(Closes[1],20)[0]);

            }


        }


It's been while though, so not sure if syntax is 100% correct or if it will make a difference even if it is, so anyone feel free to correct me, but it might be worth a try.

Reply With Quote
The following user says Thank You to vegasfoster for this post:
 
  #6 (permalink)
 Vendor: www.tools4trading.de 
Erfurt Germany
 
Futures Experience: Master
Platform: rtMagic, NinjaTrader
Broker/Data: AMP/CQG, IAB
Favorite Futures: ES, 6E, FDAX, FGBL
 
Posts: 338 since Aug 2011
Thanks: 54 given, 460 received


vegasfoster View Post
I think I've done it before like

 
Code
protected override void Initialize()

        {

            Add(PeriodType.Day, 1);

            Add(new Plot(Color.FromKnownColor(KnownColor.Orange), PlotStyle.Line, "Plot0"));

            Overlay                = true;

        }



        /// <summary>

        /// Called on each bar update event (incoming tick)

        /// </summary>

        private double SimpleMA=0;

        protected override void OnBarUpdate()

        {

            // Use this method for calculating your indicator values. Assign a value to each

            // plot below by replacing 'Close[0]' with your own formula.

            

            if (CurrentBar < 30) return;

            

            if (BarsInProgress == 0){

                if(SimpleMA!=0) Plot0.Set(SimpleMA);

            }

            if (BarsInProgress == 1){

                /*double*/ SimpleMA = SMA(Closes[1],20)[0]);

            }


        }


It's been while though, so not sure if syntax is 100% correct or if it will make a difference even if it is, so anyone feel free to correct me, but it might be worth a try.

-> you need for this logic a "global variable"!

Reply With Quote
The following user says Thank You to TimeTrade for this post:
 
  #7 (permalink)
Elite Member
oakland
 
Futures Experience: Intermediate
Platform: ninjatrader, thinkorswim
Broker/Data: IB
Favorite Futures: GC, CL, ES, ZF, ZN, DX, 6E
 
Posts: 15 since May 2010
Thanks: 8 given, 0 received

Thanks !

Reply With Quote

Reply



futures io > > > > > Display Daily SMA within Renko chart

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Is There A Way To Display The Chart Template? mkaminski NinjaTrader 4 April 5th, 2012 04:06 PM
Get Account information on chart display steve2222 NinjaTrader 1 August 14th, 2011 02:19 PM
How to access any Account information for display on a chart steve2222 NinjaTrader Programming 1 May 29th, 2011 05:19 AM
can daily&weekly indy work from monthly SMA in MA? nt6.5 mystiq NinjaTrader 4 February 27th, 2011 11:40 AM
Display on Chart wh The Elite Circle 10 October 22nd, 2009 06:09 PM


All times are GMT -4. The time now is 06:12 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-17 in 0.09 seconds with 20 queries on phoenix via your IP 54.82.81.154