Can a floating window be coded with Ninjascript ? - futures io
futures io futures trading



Can a floating window be coded with Ninjascript ?


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one max-td with 7 posts (7 thanks)
    2. looks_two trendisyourfriend with 7 posts (1 thanks)
    3. looks_3 timmyb with 5 posts (8 thanks)
    4. looks_4 wh with 3 posts (3 thanks)
      Best Posters
    1. looks_one timmyb with 1.6 thanks per post
    2. looks_two max-td with 1 thanks per post
    3. looks_3 wh with 1 thanks per post
    4. looks_4 bukkan with 0.5 thanks per post
    1. trending_up 8,624 views
    2. thumb_up 20 thanks given
    3. group 6 followers
    1. forum 29 posts
    2. attach_file 4 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
 

Can a floating window be coded with Ninjascript ?

(login for full post details)
  #1 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,656 given, 5,120 received

Is it possible to create a floating window with buttons to pass orders if different conditions occur.
For example, there could be a button to trigger/activate a buy stop order if the developing bar closes above the high of the previous bar. Things like that, is it possible with Ninja script or do we need a specific DLL created outside Ninja ?

Started this thread Reply With Quote

Can you help answer these questions
from other members on futures io?
OFA (Order Flow Analytics) Licence
NinjaTrader
Automatic pattern research with NT
Elite Algorithmic NinjaTrader Trading
If ES tracks SPX, why do support/resistance, Level 2, vo …
Emini and Emicro Index
What blockvolume is visible? - order processing
NinjaTrader
Webinar: Finding your own way in trading w/Adam Grimes
The Elite Circle
 
 
(login for full post details)
  #3 (permalink)
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 269 received


yes you can

have a look at this dsChartTrader - NinjaTrader Strategy

Reply With Quote
The following user says Thank You to bukkan for this post:
 
(login for full post details)
  #4 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received

its possible with using a ninja-strategy if i get it right what you mean.

also you have to use those buttons in the chart's toolbar if you like to start + stop this strategys
(if you want to decide manualy when the moment has come to check for those conditions)

i understand your idea like this :

you have a condition ( if the developing ( current ) bar closes above the high of the previous bar)

and if this is true yu want to send an order out ( iE a buy stop order at price X )

max-td
Reply With Quote
The following user says Thank You to max-td for this post:
 
(login for full post details)
  #5 (permalink)
Chicago, IL
 
Experience: Master
Platform: Kinetick Ninja Trader <7>
Broker: Ninja & IB
Trading: YM & Equities & Options & Mutual Funds
 
Posts: 175 since Jun 2010
Thanks: 56 given, 87 received

Why not just hold the strategy inactive in the NINJA main and click and unclick the active box as needed?

Reply With Quote
 
(login for full post details)
  #6 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,656 given, 5,120 received


mainstream View Post
Why not just hold the strategy inactive in the NINJA main and click and unclick the active box as needed?

It seems to me that a floating palette is the proper way in terms of ergonomic.

Started this thread Reply With Quote
 
(login for full post details)
  #7 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received


trendisyourfriend View Post
It seems to me that a floating palette is the proper way in terms of ergonomic.

what exactly do you mean with "a floating palette" ?

max-td
Reply With Quote
 
(login for full post details)
  #8 (permalink)
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
 
wh's Avatar
 
Posts: 538 since Jun 2009
Thanks: 298 given, 504 received


max-td View Post
what exactly do you mean with "a floating palette" ?

Hi Max,

a window that is subsidiary to the main document window. It has a special small title bar and it floats above standard windows even when it is not the current focus. A floating palette is typically used for options and controls.

Best regards

Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.
Reply With Quote
The following user says Thank You to wh for this post:
 
(login for full post details)
  #9 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received

thanks wh,

something like this it seems you mean :

https://images.appleinsider.com/office-2008-excel-8.png

i think this has to be external then, not NT-intergeted.

like bukkans Chartrader but for allowing the control of NT-strategys (on / off) instead of orders only.

max-td
Reply With Quote
The following user says Thank You to max-td for this post:
 
(login for full post details)
  #10 (permalink)
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
 
wh's Avatar
 
Posts: 538 since Jun 2009
Thanks: 298 given, 504 received



max-td View Post
thanks wh,

something like this it seems you mean :

https://images.appleinsider.com/office-2008-excel-8.png

i think this has to be external then, not NT-intergeted.

like bukkans Chartrader but for allowing the control of NT-strategys (on / off) instead of orders only.

all is possible with nt better c#, but you will switch to visual studio with nt integration to create an indicator/strategy which pass data between two forms (ninjatrader and a custoumer form). data can be in a simple form 0,1,-1 for ...

i have not look in bukkans solution.

here is a simple german tutorial:

[C#] Datenaustausch zwischen zwei Forms @ tutorials.de: Tutorials, Forum & Hilfe

but i think it is the same approach, but you will need some dlls.

Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.
Reply With Quote
The following 2 users say Thank You to wh for this post:
 
(login for full post details)
  #11 (permalink)
Chicago, IL
 
Experience: Master
Platform: Kinetick Ninja Trader <7>
Broker: Ninja & IB
Trading: YM & Equities & Options & Mutual Funds
 
Posts: 175 since Jun 2010
Thanks: 56 given, 87 received

So elegant in design, the floating window...

You might want to add to your strategy window information like: Market position, P&L, and resting orders. I find myself toggling between tabs on Ninja to see that information.

Reply With Quote
 
(login for full post details)
  #12 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received

BTW - this JAM-guy has also done this in a pretty interessting way!
he did exactly what we talked about - offering a panel to control condition-driven ENTRYs via NT-strategys in multiple ways . - well done i gotta say !

have a look at this "Button" style" - OK, its nothing external or floating but still a first class ergonomic way to handle it in my eyes.





you have clear + big enaugh buttons for klicking at + coloroptions to arrange it visualy in a style that dont allow too much mistakes.

thats the way to go in the future i think.
a coding-challange wich is worth it - but a job for the masters i think !

-

max-td
Reply With Quote
The following user says Thank You to max-td for this post:
 
(login for full post details)
  #13 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,656 given, 5,120 received

Max, that's exactly what i am talking about. Something like this, is it possible with Ninjascript alone ?

Started this thread Reply With Quote
 
(login for full post details)
  #14 (permalink)
Calcutta, India
 
Experience: Intermediate
Platform: ArthaChitra
 
Posts: 278 since Jun 2009
Thanks: 161 given, 269 received

pretty straight forward stuffs. there are some codes by mindset which puts some button on the chartpanel search for them. that should give you the starting point.

Reply With Quote
 
(login for full post details)
  #15 (permalink)
Chicago, IL
 
Experience: Master
Platform: Kinetick Ninja Trader <7>
Broker: Ninja & IB
Trading: YM & Equities & Options & Mutual Funds
 
Posts: 175 since Jun 2010
Thanks: 56 given, 87 received

Nicely done! Very impressive Grail signal also! Only trouble is that you can only have one strategy up on the chart at a time... I'm using three in my CONTROL CENTER. How would you handle that?

Reply With Quote
 
(login for full post details)
  #16 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received

hi mainstream !

good question
this will be the next step on the way here.

it will work with an external panel (not inside of NT) where your buttons are located - taken away from the chart / taken even out of Ninja !

your strats you host / load still in the CONTROL CENTER like now but the external-buttons has to "talk" with the strats
- means they have to start / stop them somehow.

its goes in direction of bukkans ChartTrader-tool (an external panel out of NT) but corresponding into NT for to start / stop the strats.

i think this will also be easier than to implent such buttons like in the picture into a NT-chart.

a small job for bukkan i would say if i see his ChartTrader-tool !

max-td
Reply With Quote
The following user says Thank You to max-td for this post:
 
(login for full post details)
  #17 (permalink)
duluth,mn
 
Experience: Advanced
Platform: ninja,thinkorswim
Broker: Amp-Zenfire
Trading: ES,Options
 
Posts: 653 since Feb 2010
Thanks: 81 given, 1,360 received

I was playing with this myself. Not for stragetgies but to hopefully have a kind of head up display.

here is what I managed in ninja without visual. I really wish I knew how to use my visual basic correctly to do this in that then in ninja. But here is an example. Let me know if it can be of some use.

Tim

Attached Thumbnails
Click image for larger version

Name:	12-19-2010 10-37-56 AM external window.png
Views:	183
Size:	62.3 KB
ID:	27138  
Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to timmyb for this post:
 
(login for full post details)
  #18 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received

hey tim, thanks for input !

what of window is this ? a normal win-pop-up- window ?

or is it something where you can place more thing in (iE buttons ) ?

max-td
Reply With Quote
 
(login for full post details)
  #19 (permalink)
duluth,mn
 
Experience: Advanced
Platform: ninja,thinkorswim
Broker: Amp-Zenfire
Trading: ES,Options
 
Posts: 653 since Feb 2010
Thanks: 81 given, 1,360 received


max-td View Post
hey tim, thanks for input !

what of window is this ? a normal win-pop-up- window ?

or is it something where you can place more thing in (iE buttons ) ?

you can add anything you want, I will build a quick one tonight and psot teh code here then you can run with it. I just learned how to do all this so i am no expert . In fact i just learned some of visual basic last night.


But basically you can build the window in visual basic, then just copy the code over to ninja, changing a few things and then when you load the indicator, or strategy the window loads. Id love for this thread to continue. So we can all learn from one another

Visit my futures io Trade Journal Reply With Quote
The following user says Thank You to timmyb for this post:
 
(login for full post details)
  #20 (permalink)
duluth,mn
 
Experience: Advanced
Platform: ninja,thinkorswim
Broker: Amp-Zenfire
Trading: ES,Options
 
Posts: 653 since Feb 2010
Thanks: 81 given, 1,360 received

Here is a simple form

I tried to organize the code the best I can, I also cannot say the code it perfect or most proficient.

but load the strategy, also make sure strategy is on and a window will pop up, with more coding this window can hold buttons etc. anything you want. This is the simplest code i know to do it, but i just learned yesterday

I think if we all work together we could really bring ninja to a whole new level

Also i know this is nothing to some people but I had never built a windows from till last night. and now i even got one with buttons that actually do orders in ninja.

WOOHOOOOOOOOO

Id like to thank big mike for this forumn, a year ago i could not code and now i can make a blank window LOL

Oh and a shout out to BUkken cause its his code that i figured out how this all works

Attached Files
Register to download File Type: zip UserWindow.zip (1.3 KB, 105 views)
Visit my futures io Trade Journal Reply With Quote
The following 6 users say Thank You to timmyb for this post:
 
(login for full post details)
  #21 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,656 given, 5,120 received

timmyb, you used Visual basic to code the window but it runs within Ninja? How can this be possible since Ninja does not understand VB ?

Started this thread Reply With Quote
 
(login for full post details)
  #22 (permalink)
duluth,mn
 
Experience: Advanced
Platform: ninja,thinkorswim
Broker: Amp-Zenfire
Trading: ES,Options
 
Posts: 653 since Feb 2010
Thanks: 81 given, 1,360 received


trendisyourfriend View Post
timmyb, you used Visual basic to code the window but it runs within Ninja? How can this be possible since Ninja does not understand VB ?


my VB is setup for C#

Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #23 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,656 given, 5,120 received


timmyb View Post
my VB is setup for C#

OK i understand, you code in VB but the output is converted into C#. To make it run anywhere do we need to install a special runtime on our computer ? or simply the NET framework is all we need ?

I wonder if we could not use this tool: https://www.helpsystems.com/product-lines/automate

Started this thread Reply With Quote
 
(login for full post details)
  #24 (permalink)
Italy (IT)
 
Experience: Advanced
Platform: ATAS, R|Trader, NT8
Broker: Rithmic
Trading: CL, Brent, GC, TF
 
LukeGeniol's Avatar
 
Posts: 1,501 since Apr 2010
Thanks: 408 given, 984 received


trendisyourfriend View Post
OK i understand, you code in VB but the output is converted into C#. To make it run anywhere do we need to install a special runtime on our computer ? or simply the NET framework is all we need ?

I think u don't need any thing else.


Quoting 
I wonder if we could not use this tool: IT Automation - AutoMate 8 - Network Automation

To do what? Automate your tasks? If so, yes!

Take your Pips, go out and Live.
Luke.
Reply With Quote
 
(login for full post details)
  #25 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,656 given, 5,120 received


LukeGeniol View Post
To do what? Automate your tasks? If so, yes!

To create windows and pass orders to Ninja as they say it can replace Windows Scripting. Since we can create windows with WSH so i thought we could do the same with automate but more simply.

Started this thread Reply With Quote
 
(login for full post details)
  #26 (permalink)
Italy (IT)
 
Experience: Advanced
Platform: ATAS, R|Trader, NT8
Broker: Rithmic
Trading: CL, Brent, GC, TF
 
LukeGeniol's Avatar
 
Posts: 1,501 since Apr 2010
Thanks: 408 given, 984 received


trendisyourfriend View Post
To create windows and pass orders to Ninja as they say it can replace Windows Scripting. Since we can create windows with WSH so i thought we could do the same with automate but more simply.

Don't think you can do it nor with Automate and even nor with WSH.
But may be I'm wrong.

Take your Pips, go out and Live.
Luke.
Reply With Quote
 
(login for full post details)
  #27 (permalink)
Market Wizard
Quebec
 
Experience: Intermediate
Platform: NinjaTrader wt Rancho Dinero's profiling tools
Broker: AMP/CQG
Trading: ES, NQ, YM
 
trendisyourfriend's Avatar
 
Posts: 3,979 since Oct 2009
Thanks: 3,656 given, 5,120 received


LukeGeniol View Post
Don't think you can do it nor with Automate and even nor with WSH.
But may be I'm wrong.

Of course you are. When i was a system analyst we used it to build quick and cheap interfaces to help users automate different functions. About automate, i know nothing about it.

Started this thread Reply With Quote
The following user says Thank You to trendisyourfriend for this post:
 
(login for full post details)
  #28 (permalink)
Neubrandenburg, Germany
 
Experience: Advanced
Platform: R
Trading: Stocks
 
wh's Avatar
 
Posts: 538 since Jun 2009
Thanks: 298 given, 504 received

if he use vb.net he runs in msil the same as c#.
so it is easy to convert to c#.

Causality is the relationship between an event (the cause) and a second event (the effect), where the second event is a consequence of the first.
Reply With Quote
 
(login for full post details)
  #29 (permalink)
duluth,mn
 
Experience: Advanced
Platform: ninja,thinkorswim
Broker: Amp-Zenfire
Trading: ES,Options
 
Posts: 653 since Feb 2010
Thanks: 81 given, 1,360 received

Ok I think I understand where i was misinforming.

I meant I use Microsoft Visual Studio. No visual basic itself

I dont convert anything I just copy and paste the code. I have to change a couple things but it was rather easy.

in microsoft visual studio I go file new windows form and build it from there. Look at the strategy code I posted and you will understand it better

Attached Thumbnails
Click image for larger version

Name:	12-20-2010 6-12-45 PM visual c#.png
Views:	155
Size:	65.0 KB
ID:	27161  
Visit my futures io Trade Journal Reply With Quote
 
(login for full post details)
  #30 (permalink)
Frankfurt
 
Experience: Intermediate
Platform: NinjaTrader
Trading: FGBL 6E B4
 
max-td's Avatar
 
Posts: 1,754 since Jun 2009
Thanks: 2,309 given, 924 received

i dont know if its helpful but i found some examples of button-styles + their coding,
maybe a good source for ideas + help :

Vista Style Button in C# - CodeProject

CRoundButton2 - A fancy graphical button - CodeProject

XP-Style Button - CodeProject


-

max-td
Reply With Quote
The following 3 users say Thank You to max-td for this post:


futures io Trading Community Platforms and Indicators NinjaTrader > Can a floating window be coded with Ninjascript ?


Last Updated on December 21, 2010


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