Auto-Maximize Window Based On Signal - NinjaTrader Programming | futures io social day trading
futures io futures trading


Auto-Maximize Window Based On Signal
Updated: Views / Replies:184 / 6
Created: by RosDaBoss Attachments:3

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
 

Auto-Maximize Window Based On Signal

  #1 (permalink)
Elite Member
USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, Tradestation, Win98
Favorite Futures: 6E, ES, TF
 
Posts: 33 since Feb 2011
Thanks: 43 given, 27 received

Auto-Maximize Window Based On Signal

Is there an existing script/feature for NT 7 that allows a signal to maximize a window of an instrument that has an alert/signal? Say for example you have a chart that has an alert signal that plays. That would be the cue to maximize the corresponding window. Heck I'm even willing to use NT8 not sure if NT8 has anything like that/.

This is what I have found so far:
https://ninjatrader.com/support/forum/showthread.php?p=248169

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
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,334 since Dec 2012
Thanks: 11,272 given, 7,084 received
Forum Reputation: Legendary


Use this:

 
Code
using System.Windows.Forms;


	protected override void OnBarUpdate()
        {
		if (CurrentBar == 400)
		{
			ChartControl.FindForm().WindowState = FormWindowState.Maximized;
				
			// might also want to use these
			//ChartControl.FindForm().BringToFront();
			//ChartControl.FindForm().Show();
		}
        }

To test, just create a new chart with 300 bars, add the new indicator, then change the data series to have >400 bars and you will see the signal trigger the window to full size.

I have thought about putting similar into rfkFlipCharts for some time, but that code is easy enough for a simple single chart signal. Said Peter.

[NB** Add 'if (ChartControl != null)' tests if there is any chance of the code being used in a non-chart strategy.]

Cheers

Travel Well
Reply With Quote
The following 3 users say Thank You to ratfink for this post:
 
  #4 (permalink)
Elite Member
USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, Tradestation, Win98
Favorite Futures: 6E, ES, TF
 
Posts: 33 since Feb 2011
Thanks: 43 given, 27 received

@ratfink Thanks for your response.

Any idea how i could possibly use it with bloodhound? So I have bloodhound (SiBloodHound) on panel 2 of my chart. The bloodhound plots a long confidence (1) or short confidence (-1) if the conditions are in place. Maybe that code you sent me above I place in panel 2 with bloodhound and monitor for the long/short confidence of 1 or -1 to maximize. It would have to be the indicator only on that chart since I have bloodhound on 20 other charts running.

In your situation you could possibly use bloodhound to create majority of the logic and just have the maximize code look at the 1 or -1 plot. That simplifies the whole situation.

Reply With Quote
The following user says Thank You to RosDaBoss for this post:
 
  #5 (permalink)
Market Wizard
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,334 since Dec 2012
Thanks: 11,272 given, 7,084 received
Forum Reputation: Legendary


RosDaBoss View Post
@ratfink Thanks for your response.

Any idea how i could possibly use it with bloodhound? So I have bloodhound (SiBloodHound) on panel 2 of my chart. The bloodhound plots a long confidence (1) or short confidence (-1) if the conditions are in place. Maybe that code you sent me above I place in panel 2 with bloodhound and monitor for the long/short confidence of 1 or -1 to maximize. It would have to be the indicator only on that chart since I have bloodhound on 20 other charts running.

In your situation you could possibly use bloodhound to create majority of the logic and just have the maximize code look at the 1 or -1 plot. That simplifies the whole situation.

I don't know Bloodhound at all, but you could write an indicator that takes any signal input (using the normal Ninja Indicator Input Parameter Dialog selection) and activates the maximise code line, the CurrentBar was just a test example.

Maybe another BloodHound user could chip in here.

Cheers

Travel Well
Reply With Quote
 
  #6 (permalink)
Market Wizard
Birmingham UK
 
Futures Experience: Intermediate
Platform: NinjaTrader
Broker/Data: IG/eSignal
Favorite Futures: Dax
 
ratfink's Avatar
 
Posts: 3,334 since Dec 2012
Thanks: 11,272 given, 7,084 received
Forum Reputation: Legendary

@RosDaBoss

Here's a simple example including code and setup, just for testing in this case I've attached it to RSI. I'm assuming you can attach to BloodHound generated indicators in the same way. If not you will need to find out how to plug user code in by a different route.

Default signal values are +1 and -1 for BH (ignore the test values).

You could obviously add loads of other control mechanisms or gates, resets, etcetera.

Cheers

 
Code
using System.Windows.Forms;


namespace NinjaTrader.Indicator
{
    [Description("Enter the description of your new custom indicator here")]
    public class rfkMaxOnSignal : Indicator
    {
        private int longValue = 1;
        private int shortValue = -1;
        private int resetBars = 1;
		
	private int signalBar = -1;
		
		
        protected override void Initialize()
        {
            Overlay	= true;
        }

        protected override void OnBarUpdate()
        {
		if (Historical)
			return;
			
		if (Input[0] >= longValue || Input[0] <= shortValue)
		{
			if (CurrentBar >= signalBar + resetBars)
			{
				signalBar = CurrentBar;
					
				if (ChartControl != null)
				{
					ChartControl.FindForm().WindowState = FormWindowState.Maximized;
				}
			}
		}
        }
}
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Travel Well
Attached Files
Register to download File Type: zip rfkMaxOnSignal.zip (1.8 KB, 3 views)
Reply With Quote
The following 2 users say Thank You to ratfink for this post:
 
  #7 (permalink)
Elite Member
USA
 
Futures Experience: Intermediate
Platform: NinjaTrader, Tradestation, Win98
Favorite Futures: 6E, ES, TF
 
Posts: 33 since Feb 2011
Thanks: 43 given, 27 received

Thanks @ratfink for your support. I just got out of work. I got in contact with Shark Indicators just to verify the plot to select. Waiting for their response.

Attached Thumbnails
Auto-Maximize Window Based On Signal-2017-08-07-18_41_03-indicators.png  
Reply With Quote
The following user says Thank You to RosDaBoss for this post:

Reply



futures io > > > > > Auto-Maximize Window Based On Signal

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

RandBots: AutoTrading Bots to diversify your trading

Oct 24
 

TopstepTrader: Profiting Without Risking Your Own Money

Oct 26

Building Open Source Indicators for NT8 w/Fat Tails @ Lizard Indicators

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Aardvark auto strategy - based on Hurley nanobiotech Elite Automated NinjaTrader Trading 175 February 17th, 2014 02:46 PM
Is MC able to backtest strategies based on multiple range-bar-based frames? theorist MultiCharts 5 December 5th, 2012 11:36 AM
server based auto strat gparkis NinjaTrader 5 September 18th, 2012 06:57 PM
Help with making a Signal based on MACD Indicator AndreasDas EasyLanguage Programming 1 June 15th, 2012 10:37 AM


All times are GMT -4. The time now is 08:55 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-10-21 in 0.10 seconds with 20 queries on phoenix via your IP 54.224.197.251