Project: Building a Calendar Spread BAR TYPE - NinjaTrader | futures io social trading
futures io futures trading


Project: Building a Calendar Spread BAR TYPE
Updated: Views / Replies:589 / 6
Created: by SodyTexas Attachments:3

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • 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, and we will never resell your private information.

-- Big Mike

Reply
 
Thread Tools Search this Thread
 

Project: Building a Calendar Spread BAR TYPE

  #1 (permalink)
Spread Trader
Austin TX
 
Futures Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker/Data: RJO
Favorite Futures: Futures, Spreads
 
SodyTexas's Avatar
 
Posts: 312 since Sep 2013
Thanks: 96 given, 839 received

Project: Building a Calendar Spread BAR TYPE

Hey futures.io (formerly BMT),

I have a impossible goal! I would like to build a Calendar Spread Bar Type.

The concept is simple, take one price from a contract and subtract it from another. i.e. NG 03-15 minus NG 04-15 (the widow maker spread).

But what I do not want to do is build it as a indicator. Why, well those who know me, knows that I like Point and Figure charts which does not have time. I can not build a PnF based indicator because the Bars in progress will not match the PnF style of the spread.

How to get around this? Build my own Bar Type!

Any thoughts on where to start?

As I work on this project I will post my progress here.. Maybe if I can get some smarter people than myself working on this we can come up with a solution; but, maybe there is no solution in NT7.

Sody

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Reply With Quote
The following user says Thank You to SodyTexas for this post:
 
  #2 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 45,899 since Jun 2009
Thanks: 29,116 given, 81,750 received

If you accomplish this, I would suggest it is useful for more than just calendar spreads, but also synthetic spreads of any nature. BTW, Sierra Chart has this built-in, which means the source code is probably available in C++ in the source folder of SC.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #3 (permalink)
Spread Trader
Austin TX
 
Futures Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker/Data: RJO
Favorite Futures: Futures, Spreads
 
SodyTexas's Avatar
 
Posts: 312 since Sep 2013
Thanks: 96 given, 839 received



Big Mike View Post
If you accomplish this, I would suggest it is useful for more than just calendar spreads, but also synthetic spreads of any nature. BTW, Sierra Chart has this built-in, which means the source code is probably available in C++ in the source folder of SC.

Mike

Thanks Mike,

I don't have SC, if someone has the source files can you upload them here?

And yes once I figure out the calendar spread I think it would be wise to add functionality for other spreads.

Cheers,

Sody

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Reply With Quote
 
  #4 (permalink)
Spread Trader
Austin TX
 
Futures Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker/Data: RJO
Favorite Futures: Futures, Spreads
 
SodyTexas's Avatar
 
Posts: 312 since Sep 2013
Thanks: 96 given, 839 received

Where to start

I am going to start by trying to add a new masterinstrument to an existing custom bartype.

I choose SveRenko because of the simplicity of the code. you can download the code here:

https://futures.io/download/ninjatrader-7/indicators/1561-download.html?view

This will be the starting point!

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Reply With Quote
 
  #5 (permalink)
Spread Trader
Austin TX
 
Futures Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker/Data: RJO
Favorite Futures: Futures, Spreads
 
SodyTexas's Avatar
 
Posts: 312 since Sep 2013
Thanks: 96 given, 839 received

Visual Studio

Also, I will be building this code in Visual Studio 2012.

It will be important to add intellisense to the project so we can easily build out the code; you can do this here:

https://futures.io/ninjatrader-programming/4781-ninjatrader-vs2010-dummies-2.html

When done correctly, you should have your VS looking like the attached image.

Cheers,

Sody

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Attached Thumbnails
Project: Building a Calendar Spread BAR TYPE-vs2012.png  
Reply With Quote
 
  #6 (permalink)
Spread Trader
Austin TX
 
Futures Experience: Advanced
Platform: Ninjatrader, Python, & R
Broker/Data: RJO
Favorite Futures: Futures, Spreads
 
SodyTexas's Avatar
 
Posts: 312 since Sep 2013
Thanks: 96 given, 839 received

You can see that the AddBar function is looking for double values.. See image attached.

What I need to do is find a way to call multiple instruments into the code. Any ideas?

"The great Traders have always been humbled by the market early on in their careers creating a deep respect for the market. Until one has this respect indelibly engraved in their makeup, the concept of money management and discipline will never be treated seriously."
Attached Thumbnails
Project: Building a Calendar Spread BAR TYPE-vs2.png  
Reply With Quote
 
  #7 (permalink)
Elite Member
Georgia
 
Futures Experience: Intermediate
Platform: Ninja
Broker/Data: Mirus/Zen Fire
Favorite Futures: ZN, ES, FGBM, ZC
 
fesx's Avatar
 
Posts: 113 since Jul 2009
Thanks: 604 given, 100 received

@SodyTexas, How is the spread bar type coming along? I have always been interested in spread charts.

Reply With Quote

Reply



futures io > > > > Project: Building a Calendar Spread BAR TYPE

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

FIO Journal Challenge featuring NinjaTrader ($2,000+ of prizes)

May

An overview of volumetric analytical tools w/Sergey Sokolov @ PTMC

Elite only

John Hoagland (TBA)

Elite only

FuturesTrader71 Extended Ask Me Anything (AMA)

Elite only

Pete @ Jigsaw Trading (TBA)

Elite only

John @ No BS Day Trading (TBA)

Elite only

An Afternoon with FIO member Softsoap (being rescheduled)

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get this bar type? thefxpros NinjaTrader 5 September 25th, 2014 12:39 PM
E-Mini Calendar Spread Tick Size Jsmith10 Emini Index Futures Trading 2 July 8th, 2014 03:11 AM
ugliest bar type ever! Happyface Elite Automated Trading 4 March 10th, 2014 03:06 AM
Method of scripting to project price series IN FRONT of current bar? forrestang NinjaTrader Programming 4 May 2nd, 2012 11:01 AM
Bar Counter For Line Break Bar Type Eagle01 NinjaTrader Programming 8 April 1st, 2012 11:29 PM


All times are GMT -4. The time now is 09:48 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-05-29 in 0.10 seconds with 20 queries on phoenix via your IP 54.162.19.123