Open ChartTrader with Strategy - NinjaTrader Programming | futures io social day trading
futures io futures trading


Open ChartTrader with Strategy
Updated: Views / Replies:4,446 / 18
Created: by nailz420 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
 

Open ChartTrader with Strategy

  #1 (permalink)
Elite Member
NYC
 
Futures Experience: Beginner
Platform: NinjaTrader
 
Posts: 14 since Dec 2009
Thanks: 9 given, 9 received

Open ChartTrader with Strategy

Hi,

I found how to make enable chart trade while running a strategy on the chart. I put this code in the OnBarUpdate method:
 
Code
        ChartControl.ChartTraderEnabled = true;
	ChartControl.Controls["pnlChartTrader"].Enabled = true;
	ChartControl.Controls["pnlChartTrader"].Visible = true;	
	ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"].Enabled = true;
	ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"].Visible = true;
This code opens the chart trader panel and allows you to place orders and shows the current pnl. However it does not enable to context menu order placement options or the on-chart order and avg price markers. Any idea how that can be enabled as well?

Thanks,
Tim

Reply With Quote
The following 3 users say Thank You to nailz420 for this post:
 
  #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)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received



nailz420 View Post
Hi,

I found how to make enable chart trade while running a strategy on the chart. I put this code in the OnBarUpdate method:
 
Code
        ChartControl.ChartTraderEnabled = true;
	ChartControl.Controls["pnlChartTrader"].Enabled = true;
	ChartControl.Controls["pnlChartTrader"].Visible = true;	
	ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"].Enabled = true;
	ChartControl.Controls["pnlChartTrader"].Controls["ctrChartTraderControl"].Visible = true;
This code opens the chart trader panel and allows you to place orders and shows the current pnl. However it does not enable to context menu order placement options or the on-chart order and avg price markers. Any idea how that can be enabled as well?

Thanks,
Tim

Thanks for sharing this info!

I got around the whole thing by running an indicator that passed order variables to a strategy that was called from within the indicator and that also invoked an ATM strategy for handling stops and targets. That way all the Chart Trader, menu order placement and on chart order placement was available. It also allowed me to
drag the stops and targets and still have the ATM manage them. I created new buttons on the Chart Trader to set stop limit orders for range bars.

You might get some help from the guys in these threads....

https://futures.io/elite-circle/8480-tmft-requesting-advice-custom-indicator-22.html#post194893

https://futures.io/ninjatrader-programming/8795-charttrader-order-button-size-width-5.html#post194891

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"

Last edited by ThatManFromTexas; February 24th, 2012 at 06:06 PM.
Reply With Quote
The following 4 users say Thank You to ThatManFromTexas for this post:
 
  #4 (permalink)
Elite Member
Lagos, Nigeria
 
Futures Experience: Intermediate
Platform: NinjaTrader, SierraChart
Favorite Futures: Euro Currency & Oil
 
lolu's Avatar
 
Posts: 2,440 since Jun 2009
Thanks: 999 given, 1,595 received


ThatManFromTexas View Post
Thanks for sharing this info!

I got around the whole thing by running an indicator that passed order variables to a strategy that was called from within the indicator and that also invoked an ATM strategy for handling stops and targets. That way all the Chart Trader, menu order placement and on chart order placement was available. It also allowed me to
drag the stops and targets and still have the ATM manage them. I created new buttons on the Chart Trader to set stop limit orders for range bars.

You might get some help from the guys in these threads....

https://futures.io/elite-circle/8480-tmft-requesting-advice-custom-indicator-22.html#post194893

https://futures.io/ninjatrader-programming/8795-charttrader-order-button-size-width-5.html#post194891

@TMFT

Which indicator do you have that will pass order variables to a strategy that is called from within it and which also invokes an ATM strategy for handling stops and targets ? I attempted to use the TradersInsight indicator (one of Gomi's Ladder derivatives) to do Order placement some time ago; I can explore that again.

Lolu

Reply With Quote
 
  #5 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received


lolu View Post
@TMFT

Which indicator do you have that will pass order variables to a strategy that is called from within it and which also invokes an ATM strategy for handling stops and targets ? I attempted to use the TradersInsight indicator (one of Gomi's Ladder derivatives) to do Order placement some time ago; I can explore that again.

Lolu

@lolu

The only purpose of the indicator is to pass the order info to the strategy.

 
Code
 #region Variables
        private NinjaTrader.Strategy.TMFTGuidedStrategy trader;

 void OnBuy(object sender, System.EventArgs e)
			
        {
			
			trader.EnterPosition(OrderAction.Buy,OrderType.Stop, 1, rangeHi, 0, 0, buyRange);
            
        }

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
The following 2 users say Thank You to ThatManFromTexas for this post:
 
  #6 (permalink)
Elite Member
Lagos, Nigeria
 
Futures Experience: Intermediate
Platform: NinjaTrader, SierraChart
Favorite Futures: Euro Currency & Oil
 
lolu's Avatar
 
Posts: 2,440 since Jun 2009
Thanks: 999 given, 1,595 received


ThatManFromTexas View Post
@lolu

The only purpose of the indicator is to pass the order info to the strategy.

 
Code
 #region Variables
        private NinjaTrader.Strategy.TMFTGuidedStrategy trader;

 void OnBuy(object sender, System.EventArgs e)
			
        {
			
			trader.EnterPosition(OrderAction.Buy,OrderType.Stop, 1, rangeHi, 0, 0, buyRange);
            
        }

@TMFT,

What about the TMFTGuidedStrategy strategy codes ? Also, could you suggest a name for the indicator, or better still, the complete codes of the indicator.

Lolu

Reply With Quote
 
  #7 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received


lolu View Post
@TMFT,

What about the TMFTGuidedStrategy strategy codes ? Also, could you suggest a name for the indicator, or better still, the complete codes of the indicator.

Lolu

You have to have a place to receive all the pieces of information that the indicator sent.

 
Code
 public void EnterPosition(OrderAction way, OrderType oType, int quantity, double entry, double target, double stop, Button btnCallback)
        {
            

            switch (way)
            {	
                case OrderAction.Buy:
                    switch (oType)
                    {	
						
                        case OrderType.Stop:
							string[] entryOrder = GetAtmStrategyEntryOrderStatus(orderId);
                            atmStrategyId = GetAtmStrategyUniqueId();
							orderId = GetAtmStrategyUniqueId();
							AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Stop, 0, entry,
							TimeInForce.Day, orderId, atmname, atmStrategyId);
                            break;
You can name the indicator anything you want. The strategy has to be named the same thing that you called it in the indicator.

I am NOT a programmer. I am NOT qualified to write strategies for people. I have written simple indicators because I don't believe they could cause a trader serious problems. However, writing something that can generate actual orders is pressure I don't need. (Did I mention the heart attack....)

@bukkan, @BigMike and others on this site have in depth knowledge in this area. I respectfully ask that you contact someone with more experience than me for strategies .

We all have lofty goals... mine is to stay awake the entire trading day ...

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
The following user says Thank You to ThatManFromTexas for this post:
 
  #8 (permalink)
Elite Member
Lagos, Nigeria
 
Futures Experience: Intermediate
Platform: NinjaTrader, SierraChart
Favorite Futures: Euro Currency & Oil
 
lolu's Avatar
 
Posts: 2,440 since Jun 2009
Thanks: 999 given, 1,595 received


ThatManFromTexas View Post
You have to have a place to receive all the pieces of information that the indicator sent.

 
Code
 public void EnterPosition(OrderAction way, OrderType oType, int quantity, double entry, double target, double stop, Button btnCallback)
        {
            

            switch (way)
            {	
                case OrderAction.Buy:
                    switch (oType)
                    {	
						
                        case OrderType.Stop:
							string[] entryOrder = GetAtmStrategyEntryOrderStatus(orderId);
                            atmStrategyId = GetAtmStrategyUniqueId();
							orderId = GetAtmStrategyUniqueId();
							AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Stop, 0, entry,
							TimeInForce.Day, orderId, atmname, atmStrategyId);
                            break;
You can name the indicator anything you want. The strategy has to be named the same thing that you called it in the indicator.

I am NOT a programmer. I am NOT qualified to write strategies for people. I have written simple indicators because I don't believe they could cause a trader serious problems. However, writing something that can generate actual orders is pressure I don't need. (Did I mention the heart attack....)

@bukkan, @BigMike and others on this site have in depth knowledge in this area. I respectfully ask that you contact someone with more experience than me for strategies .

We all have lofty goals... mine is to stay awake the entire trading day ...

@TMFT,

No, no, no ... I'm not requesting that you write a Strategy. The fact is that, I don't use Strategy ... I detest Strategy. I just wanted the indicator that you have, that passes order variables to a strategy (such as your RangerATM Strategy) and that is called from within it and which also invokes an ATM strategy for handling stops and targets.; but what you posted is part of the codes for the indicator and which I'm unable to understand.

Lolu

Reply With Quote
 
  #9 (permalink)
Elite Member
Houston,Tx
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Mirus Futures/Zen-Fire
Favorite Futures: TF
 
ThatManFromTexas's Avatar
 
Posts: 2,302 since Feb 2010
Thanks: 1,208 given, 4,293 received


lolu View Post
@TMFT,

No, no, no ... I'm not requesting that you write a Strategy. The fact is that, I don't use Strategy ... I detest Strategy. I just wanted the indicator that you have, that passes order variables to a strategy (such as your RangerATM Strategy) and that is called from within it and which also invokes an ATM strategy for handling stops and targets.; but what you posted is part of the codes for the indicator and which I'm unable to understand.

Lolu

The RangerATM Strategy creates buttons in the toolbar and can not be in the same chart as the chart trader. It is a strategy and invokes an ATM strategy to handle the stops and targets. It doesn't connect to an indicator. @bukkan helped me create it and has a in depth understanding of order handling in NT.

The snippet I posted above from an indicator requires a strategy to pass the information to . It is totally different from the Ranger ATM strategy and a lot more complicated (translation: a lot easier to screw things up). You need to get input from someone of Bukkan's ability to advise you on it. I do not have the skill level to justify passing out critical code to traders that could very well blow them up.

I'm just a simple man trading a simple plan.

My daddy always said, "Every day above ground is a good day!"
Reply With Quote
The following user says Thank You to ThatManFromTexas for this post:
 
  #10 (permalink)
Elite Member
Lagos, Nigeria
 
Futures Experience: Intermediate
Platform: NinjaTrader, SierraChart
Favorite Futures: Euro Currency & Oil
 
lolu's Avatar
 
Posts: 2,440 since Jun 2009
Thanks: 999 given, 1,595 received



ThatManFromTexas View Post
The RangerATM Strategy creates buttons in the toolbar and can not be in the same chart as the chart trader. It is a strategy and invokes an ATM strategy to handle the stops and targets. It doesn't connect to an indicator. @bukkan helped me create it and has a in depth understanding of order handling in NT.

The snippet I posted above from an indicator requires a strategy to pass the information to . It is totally different from the Ranger ATM strategy and a lot more complicated (translation: a lot easier to screw things up). You need to get input from someone of Bukkan's ability to advise you on it. I do not have the skill level to justify passing out critical code to traders that could very well blow them up.

My brain is getting grasp of it now. I quite already understood the function of your RangerATM which I had used in the past. In any case, I'm confident that your codes wouldn't blow me up; I can handle it ... incidentally, I'm a Programmer. Meanwhile, I'll explore Bukkan's inputs.

Lolu

Reply With Quote
The following 2 users say Thank You to lolu for this post:

Reply



futures io > > > > > Open ChartTrader with Strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
ChartTrader bukkan NinjaTrader Programming 7 August 3rd, 2012 01:25 AM
Logical error in the strategy based on open types Alexlaxmikant EasyLanguage Programming 7 May 2nd, 2012 09:21 AM
ChartTrader Indicator louiswelt NinjaTrader 1 June 16th, 2011 12:03 AM
Strategy to open only 1 trade peter88 NinjaTrader Programming 7 January 25th, 2011 01:47 PM
Volitility indicator question - Open - Open / open - close / close to open andresimon NinjaTrader 2 September 27th, 2010 01:33 AM


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