Custom symbol - futures io
futures io futures trading



Custom symbol


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Alex91320 with 10 posts (1 thanks)
    2. looks_two Fat Tails with 9 posts (5 thanks)
    3. looks_3 Nimble with 1 posts (0 thanks)
    4. looks_4 Quick Summary with 1 posts (0 thanks)
    1. trending_up 6,197 views
    2. thumb_up 6 thanks given
    3. group 4 followers
    1. forum 20 posts
    2. attach_file 3 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 125,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

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

 
Search this Thread
 

Custom symbol

(login for full post details)
  #1 (permalink)
CA
 
Experience: Intermediate
Platform: NinjaTrader,JTrader,ThinkOrSwim
Broker: IQFeed
Trading: ES, ETF
 
Posts: 17 since Aug 2009
Thanks: 5 given, 20 received

Hi,

I would like to chart a custom symbol in Ninja 6.5. What I am interested in is very simple for now. Stock price A - Stock price B.

In TOS, I can just do A-B to see the difference. Or -A to invert the Chart for Stock A.

Is there a way to do this in Ninja? I can program indicators a bit so if it needs simple coding, works for me as well.

Thanks!

Nimble

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
COTbase for quant trading?
Elite Algorithmic NinjaTrader Trading
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
Which kind of Blockvolume is visible? - order processing
Emini and Emicro Index
MACD line not plotting after change of plot order
NinjaTrader
Cross border fund flows / fx correlations
Treasury Notes and Bonds
 
 
(login for full post details)
  #3 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


I think there is no easy way to do this in NinjaTrader. One option would be

- create a chart with 2 data series for stock A and stock B
- then apply a spread indicator to the chart

You would then have a chart with three sections, stock A, stock B and the spread. Spread indicators can be found in the download section of this forum or the NinjaTrader forum.

By the way, the simple difference of two stocks, such as A-B, does not make any sense. You would want to balance the stocks in line with their Beta, if you take any difference. It would be much easier to work with a simple ratio spread, as this already compares the logarithm of price.

Ratio spread indicator can also be found in the download sections.

Reply With Quote
The following 3 users say Thank You to Fat Tails for this post:
 
(login for full post details)
  #4 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

I got the "spread" indicator to plot the diff, but I'd like to apply haiki ashi to it.
Sadly, "spread" being an indicator itself, I cant apply another indicator to it...
can anyone offer a suggestion on how to get it done?

I was told it IS possible to apply an oscillator to "spread".. sounds like that's applying an indicator to indicator..

Thanx

Reply With Quote
 
(login for full post details)
  #5 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
I got the "spread" indicator to plot the diff, but I'd like to apply haiki ashi to it.
Sadly, "spread" being an indicator itself, I cant apply another indicator to it...
can anyone offer a suggestion on how to get it done?

I was told it IS possible to apply an oscillator to "spread".. sounds like that's applying an indicator to indicator..

Thanx

The spread indicator uses a particular synchronisation method, which makes it vulnerable of being called by other indicators, so do not expect the usual behaviour. You cannot apply the default Heikin Ashi indicator.

However, there is modified HeikinAshi indicator here



which can be applied to the spread indicator. Select spread with appropriate settings as input series, select a separate panel and set "UseOnMainPanel" to false. You will get a result as shown on the chart below (spread of WTI over Brent).

Do not touch the chart anymore, if you change any settings, it might quickly dissipate.


Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #6 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

@ Fat tails... You just put up a pic of something a number of NT coders I've contacted were troubled by!
Sending PM..

Thanx

Reply With Quote
 
(login for full post details)
  #7 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

Mike, please forgive me...
I tried to PM Fat Tails, and was denied, as I only had 4 posts

Reply With Quote
 
(login for full post details)
  #8 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

@Fattails



Here is a link to Ninjatrader support forums where they are discussing ability to have excel exchange data with NT, so excel will take the two live quotes, perform the calculation and send it back to NT in a form of a symbol.

And here they are using "BigMike Excel" plug in to get this done

Then we can add the custom symbol to NT and BAM! we have the spread calculation thats a symbol and can accept indicators, etc...

Just a thought.....

Reply With Quote
 
(login for full post details)
  #9 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
@Fattails



Here is a link to Ninjatrader support forums where they are discussing ability to have excel exchange data with NT, so excel will take the two live quotes, perform the calculation and send it back to NT in a form of a symbol.

And here they are using "BigMike Excel" plug in to get this done

Then we can add the custom symbol to NT and BAM! we have the spread calculation thats a symbol and can accept indicators, etc...

Just a thought.....

@ Alex91320: I think that this approach is too complex and will not solve the synchronisation issue.

There is a Pairs Suite on the NinjaTrader forum, which has a few bugs (throws exceptions), but it can be used for your purpose with minor modifications.

Let me come back with a solution.

Reply With Quote
The following user says Thank You to Fat Tails for this post:
 
(login for full post details)
  #10 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received


Fattails,

I tried the pairs indicator, had same issue.
however, If you can make it work, I'll be forever grateful!

Reply With Quote
 
(login for full post details)
  #11 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
Fattails,

I tried the pairs indicator, had same issue.
however, If you can make it work, I'll be forever grateful!

What issues did you have exactly?

Reply With Quote
 
(login for full post details)
  #12 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

a variety from the list below:
1. Haiki Ashi doesn't plot
2. main (1st panel) plot of ES disappears
3. The "pairs" plot disappears
4. Fisher transform doesn't plot
5. Chart becomes a big red X

I'm relatively new to NT, so its quite possible/likely that some of these are caused by "operator" error.

In the end, what I'm trying to achieve is:

ES on panel1
spread of 2 instruments (neither is ES) on panel 2
The spread (panel2) is plotted in HA
Fisher transform is applied to the spread

Reply With Quote
 
(login for full post details)
  #13 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
a variety from the list below:
1. Haiki Ashi doesn't plot
2. main (1st panel) plot of ES disappears
3. The "pairs" plot disappears
4. Fisher transform doesn't plot
5. Chart becomes a big red X

I'm relatively new to NT, so its quite possible/likely that some of these are caused by "operator" error.

In the end, what I'm trying to achieve is:

ES on panel1
spread of 2 instruments (neither is ES) on panel 2
The spread (panel2) is plotted in HA
Fisher transform is applied to the spread

Sounds like an interesting puzzle. I will try to solve it.

Reply With Quote
 
(login for full post details)
  #14 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received


Fat Tails View Post
Sounds like an interesting puzzle. I will try to solve it.

@Fattails
I Found an alternative and got Fisher to perform as needed.
Thank you for all your help, glad I joined the board!

Reply With Quote
The following user says Thank You to Alex91320 for this post:
 
(login for full post details)
  #15 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
@Fattails
I Found an alternative and got Fisher to perform as needed.
Thank you for all your help, glad I joined the board!


Good to know... as I am curious, what alternative did you find?

Reply With Quote
 
(login for full post details)
  #16 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

Instead of using HA color as trend filter for the spread I ended up using a moving average.

So far looks good, I'll know for sure after I do some back testing over the weekend.

Reply With Quote
 
(login for full post details)
  #17 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
Instead of using HA color as trend filter for the spread I ended up using a moving average.

So far looks good, I'll know for sure after I do some back testing over the weekend.

Using Heikin Ashi candles for a spread is a weird idea, because of technical limitations.

If you open a 15 min chart and you load the synchronized data for two instruments on this chart to calculate the spread, you can only calculate spread values for the open and the close. The intrabar high and low of the spread cannot be determined, as the high and low of the two bar series are - unlike open and close - not synchronized.

So you cannot create a candle to represent the spread, unlike you rely on intrabar data. For example I could use a 1 min bar series of both instruments to calculate the highest and lowest difference of the closes over a 15 min period and then chart it as the high and low of a 15 min candle. But this is a more compex task than to calculate a simple spread.

As we do not get any highs and lows, we can neither chart the spread as conventional candles nor as Heikin Ashin candles. If you want to extract the trend from the spread, here is a suggestion:

Chart the ratio or the spread on a separate panel. Then apply bollinger bands to the spread and play a little bit with the settings. The chart below shows the Universal Bollinger Indicator applied to the YM 03-12 / ES 03-12 ratio.

You will notice that the Bollinger Bands can produce conforming or conflicting trend signals. Have not yet finished the spread and ratio indicators, but you can take any of those to play around.


Reply With Quote
 
(login for full post details)
  #18 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

@Fatails
There is a new addition to the NT7 indicator section, its called "spread candlesticks".
It plots SPread with candlesticks Author mentioned something about removing synch code to accommodate the OHLC values that are required for candles/haiken.
I'm interested in using this new indicator as soon as I can figure out how to leave out the main data series and plot the spread of two alternative instruments.

Question is, how will exclusion of the synch code in this version of Spread to accommodate the OHLC values affect the output value/ output integrity (could it produce dud reading when it couldnt sync)?

Using original Spread3 as input for another indicator (fisher transform) gives me problems when I try to access diff TFs in MarketAnalyzer couple other indicators that access non-defult TF dataseries.

Any other more stable alternatives to get spread calculations for use as input?

Reply With Quote
 
(login for full post details)
  #19 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
@Fatails
There is a new addition to the NT7 indicator section, its called "spread candlesticks".
It plots SPread with candlesticks Author mentioned something about removing synch code to accommodate the OHLC values that are required for candles/haiken.
I'm interested in using this new indicator as soon as I can figure out how to leave out the main data series and plot the spread of two alternative instruments.

Question is, how will exclusion of the synch code in this version of Spread to accommodate the OHLC values affect the output value/ output integrity (could it produce dud reading when it couldnt sync)?

Using original Spread3 as input for another indicator (fisher transform) gives me problems when I try to access diff TFs in MarketAnalyzer couple other indicators that access non-defult TF dataseries.

Any other more stable alternatives to get spread calculations for use as input?

Not sure, whether that indicator works correctly, could you post it here? If you try to use candles for a spread, this basically requires intra-bar information, as you cannot calculate high and low of the spread from high and low of the data series that are used to calculate the spread.

I have not studied other spread indicators. NinjaTrader is not the best tool, if you want to trade spreads. If you just need a spread as an indicator, NinjaTrader should do.

Reply With Quote
 
(login for full post details)
  #20 (permalink)
Los Angeles, CA
 
Experience: Advanced
Platform: TOS, NT
Broker: AMp Futures/CQG
Trading: Options, Futures
 
Posts: 16 since Sep 2010
Thanks: 15 given, 9 received

I've attached the CandleSpreads

Spread3 gives me errors when I use it as input for another indi due to its OHLC, hopefully "Pairs" will perform better

Attached Files
Register to download File Type: zip SpreadCandlesticks.zip (3.8 KB, 33 views)
Reply With Quote
 
(login for full post details)
  #21 (permalink)
Market Wizard
Berlin, Europe
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
 
Fat Tails's Avatar
 
Posts: 9,855 since Mar 2010
Thanks: 4,238 given, 26,729 received


Alex91320 View Post
I've attached the CandleSpreads

Spread3 gives me errors when I use it as input for another indi due to its OHLC, hopefully "Pairs" will perform better

I do not think that the formula used by the SpreadCandlesticks indicator is correct. The Pairs indicator also has a bug, as far as I know. There is still some work to be done on that subject.

Reply With Quote


futures io Trading Community Platforms and Indicators NinjaTrader > Custom symbol


Last Updated on February 27, 2012


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
 

Battlestations! Show us your trading desk - $1,500 in prizes!

March
 

Importance of Finding Your Own Way w/Adam Grimes

Elite only
 

Journal Challenge w/Jigsaw

April
     



Copyright © 2021 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