The indicator appears and disappears - NinjaTrader Programming | futures io social day trading
futures io futures trading


The indicator appears and disappears
Updated: Views / Replies:953 / 10
Created: by eryo 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
 1  
 
Thread Tools Search this Thread
 

The indicator appears and disappears

  #1 (permalink)
Elite Member
Córdoba, Spain
 
Futures Experience: Intermediate
Platform: ninja trader
Broker/Data: zen fire
Favorite Futures: gold
 
Posts: 40 since Apr 2010
Thanks: 13 given, 7 received

The indicator appears and disappears

Excuse my English. I have scheduled an indicator that sometimes appears on the graph and not others. Why? Help please

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,219 since Jun 2009
Thanks: 628 given, 6,316 received
Forum Reputation: Legendary



eryo View Post
Excuse my English. I have scheduled an indicator that sometimes appears on the graph and not others. Why? Help please

what is indicator's name?

Reply With Quote
 
  #4 (permalink)
Elite Member
Córdoba, Spain
 
Futures Experience: Intermediate
Platform: ninja trader
Broker/Data: zen fire
Favorite Futures: gold
 
Posts: 40 since Apr 2010
Thanks: 13 given, 7 received

It is one that I designed for practicing simple. If the closure of 0 is greater than the closing of the closure 1 and 2 to draw a triangle. It works but it does not always appear in the graph

Reply With Quote
 
  #5 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary


eryo View Post
It is one that I designed for practicing simple. If the closure of 0 is greater than the closing of the closure 1 and 2 to draw a triangle. It works but it does not always appear in the graph

You need to post your indicator as an attachment, otherwise we can only make guesses.

Reply With Quote
 
  #6 (permalink)
Elite Member
Córdoba, Spain
 
Futures Experience: Intermediate
Platform: ninja trader
Broker/Data: zen fire
Favorite Futures: gold
 
Posts: 40 since Apr 2010
Thanks: 13 given, 7 received

the code is this. I have placed overlay in true and still fails
Thank you.


#region Using declarations
using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Drawing;
using System.Drawing.Drawing2D;
using System.Xml.Serialization;
using NinjaTrader.Cbi;
using NinjaTrader.Data;
using NinjaTrader.Gui.Chart;
#endregion

// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
[Description("Enter the description of your new custom indicator here")]
public class aaaTad : Indicator
{
#region Variables
// Wizard generated variables
// User defined variables (add any user defined variables below)
#endregion

/// <summary>
/// This method is used to configure the indicator and is called once before any bar data is loaded.
/// </summary>
protected override void Initialize()
{
Overlay = false;
}

/// <summary>
/// Called on each bar update event (incoming tick)
/// </summary>
protected override void OnBarUpdate()
{
if(Close[0]>=Close[1]&& //modificacion
Close[0]>Open[1]&&
Close[0]>Close[-1]&&
Close[0]>Close[-2]&&
Close[0]>Close[-3])

DrawTriangleDown(CurrentBar.ToString(),true,0,High[0]+((TickSize*4)*2),Color.Blue);//codigo para dibujar una raya

//modificacion a partir de aqui

if(Close[0]<=Close[1]&&
Close[0]<Open[1]&&
Close[0]<Close[-1]&&
Close[0]<Close[-2]&&
Close[0]<Close[-3])

DrawTriangleUp(CurrentBar.ToString(),true,0,Low[0]-((TickSize*4)*2),Color.Red);

DrawRay("tag1", 10, 1000, 0, 1001, Color.Green);//nuevo


}

#region Properties

#endregion
}
}

#region NinjaScript generated code. Neither change nor remove.
// This namespace holds all indicators and is required. Do not change it.
namespace NinjaTrader.Indicator
{
public partial class Indicator : IndicatorBase
{
private aaaTad[] cacheaaaTad = null;

private static aaaTad checkaaaTad = new aaaTad();

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public aaaTad aaaTad()
{
return aaaTad(Input);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public aaaTad aaaTad(Data.IDataSeries input)
{
if (cacheaaaTad != null)
for (int idx = 0; idx < cacheaaaTad.Length; idx++)
if (cacheaaaTad[idx].EqualsInput(input))
return cacheaaaTad[idx];

lock (checkaaaTad)
{
if (cacheaaaTad != null)
for (int idx = 0; idx < cacheaaaTad.Length; idx++)
if (cacheaaaTad[idx].EqualsInput(input))
return cacheaaaTad[idx];

aaaTad indicator = new aaaTad();
indicator.BarsRequired = BarsRequired;
indicator.CalculateOnBarClose = CalculateOnBarClose;
#if NT7
indicator.ForceMaximumBarsLookBack256 = ForceMaximumBarsLookBack256;
indicator.MaximumBarsLookBack = MaximumBarsLookBack;
#endif
indicator.Input = input;
Indicators.Add(indicator);
indicator.SetUp();

aaaTad[] tmp = new aaaTad[cacheaaaTad == null ? 1 : cacheaaaTad.Length + 1];
if (cacheaaaTad != null)
cacheaaaTad.CopyTo(tmp, 0);
tmp[tmp.Length - 1] = indicator;
cacheaaaTad = tmp;
return indicator;
}
}
}
}

// This namespace holds all market analyzer column definitions and is required. Do not change it.
namespace NinjaTrader.MarketAnalyzer
{
public partial class Column : ColumnBase
{
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.aaaTad aaaTad()
{
return _indicator.aaaTad(Input);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.aaaTad aaaTad(Data.IDataSeries input)
{
return _indicator.aaaTad(input);
}
}
}

// This namespace holds all strategies and is required. Do not change it.
namespace NinjaTrader.Strategy
{
public partial class Strategy : StrategyBase
{
/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
[Gui.Design.WizardCondition("Indicator")]
public Indicator.aaaTad aaaTad()
{
return _indicator.aaaTad(Input);
}

/// <summary>
/// Enter the description of your new custom indicator here
/// </summary>
/// <returns></returns>
public Indicator.aaaTad aaaTad(Data.IDataSeries input)
{
if (InInitialize && input == null)
throw new ArgumentException("You only can access an indicator with the default input/bar series from within the 'Initialize()' method");

return _indicator.aaaTad(input);
}
}
}
#endregion

Reply With Quote
 
  #7 (permalink)
Market Wizard
Sarasota FL
 
Futures Experience: Intermediate
Platform: NinjaTrader, Sierra Chart
Favorite Futures: ES
 
Posts: 3,635 since Jan 2013
Thanks: 26,758 given, 11,115 received
Forum Reputation: Legendary


eryo View Post
the code is this. I have placed overlay in true and still fails
Thank you.

It's going to be difficult for anyone to deal with unformatted code like this. You would be better off to export the indicator and attach it as an attachment to a post here, so someone can figure out what's going on.

If you're not sure how to do that, it's in Ninja Help, or you can ask here.

Bob.

Reply With Quote
 
  #8 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary

Please post indicator as attachement.

The code above is difficult to read.

Reply With Quote
 
  #9 (permalink)
Elite Member
Córdoba, Spain
 
Futures Experience: Intermediate
Platform: ninja trader
Broker/Data: zen fire
Favorite Futures: gold
 
Posts: 40 since Apr 2010
Thanks: 13 given, 7 received

thank you

Attached Files
Register to download File Type: cs aaaTac.cs (5.6 KB, 4 views)
Reply With Quote
 
  #10 (permalink)
Elite Member
Berlin, Europe
 
Futures Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker/Data: Interactive Brokers
Favorite Futures: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,653 since Mar 2010
Thanks: 4,226 given, 25,601 received
Forum Reputation: Legendary



eryo View Post
thank you

(1) In the beginning of OnBarUpdate() you need to insert the line
 
Code
if(CurrentBar < 3)
    return;

This is to avoid to try to access a value 3 bars ago for the first three bars, as such a value would not exist.


(2) You cannot use negative indices with Close.

Close[0], Open[0] refer to the last bar on your chart.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:

Reply



futures io > > > > > The indicator appears and disappears

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
Form/Window Indicator appears in all open workspaces bmtrader333 NinjaTrader Programming 10 April 30th, 2014 01:40 PM
CIA chief says appears Saudi oil "ramping up" kbit News and Current Events 0 January 31st, 2012 03:34 PM
Health reform lawsuit appears headed for Supreme Court kbit News and Current Events 0 September 26th, 2011 08:33 PM
Why AT&T/T-Mobile Deal Appears to Be Dead Already Quick Summary News and Current Events 0 September 1st, 2011 07:00 PM
'Business-Friendly Bahrain' Disappears; Ex-Pats Exit Quick Summary News and Current Events 0 March 17th, 2011 05:20 AM


All times are GMT -4. The time now is 12:14 PM.

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-15 in 0.13 seconds with 20 queries on phoenix via your IP 54.226.34.209