NexusFi: Find Your Edge


Home Menu

 





SMI2 Indicator


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one TheWizard with 18 posts (9 thanks)
    2. looks_two perryg with 11 posts (2 thanks)
    3. looks_3 cory with 6 posts (2 thanks)
    4. looks_4 keepdchange with 6 posts (0 thanks)
      Best Posters
    1. looks_one zeller4 with 1 thanks per post
    2. looks_two TheWizard with 0.5 thanks per post
    3. looks_3 cory with 0.3 thanks per post
    4. looks_4 perryg with 0.2 thanks per post
    1. trending_up 21,956 views
    2. thumb_up 15 thanks given
    3. group 7 followers
    1. forum 50 posts
    2. attach_file 11 attachments




 
Search this Thread

SMI2 Indicator

  #31 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224


cory View Post
you use drawregion command, basically you pain from one y value to other y value as you go bar by bar.
https://www.ninjatrader-support.com/HelpGuideV6/helpguide.html?DrawRegion
check out my market range coloring


in this case since y1 and y2 is fix value it is very simple;
DrawRegion("band1", CurrentBar, 0, 20, -20, Color.Green, 10);

Cory,

I tried that & it doesn't seem to like that line of code. I get:
"No overload for method "DrawRegion" takes "7" arguments"

So, I went in to your indicator & copied code & modified it for mine:
(added a private double M = 0; the public data series for "Middle", "UR" (upper region) and "LR" (lower region), thinking that if '0' was the middle, +20 would be the upper region and -20 would be the lower region & then added this code:

Middle.Set(M);
UR.Set(20);
LR.Set(-20);
DrawRegion("choparea", CurrentBar, 0, Middle, UR, Color.Transparent, Color.DimGray, 10);
DrawRegion("choparea", CurrentBar, 0, Middle, LR, Color.Transparent, Color.DimGray, 10);

And EVERYTHING disappeared from that indicator panel - all the lines, histogram bars, alert lines, - everything. HELP! (THANKS!)

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Better Renko Gaps
The Elite Circle
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
Exit Strategy
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
34 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
GFIs1 1 DAX trade per day journal
11 thanks
  #32 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

it wiped out because it try to draw region on price panel you need to tell it 'no'
...
DrawOnPricePanel = false;
...

you code will work but it's kind of heavy for this job, here is a sample using one data series only.

Attached Thumbnails
Click image for larger version

Name:	ES 03-10  3_5_2010 (MedianRenko 4 Ticks).jpg
Views:	348
Size:	99.1 KB
ID:	9200  
Attached Files
Elite Membership required to download: SMI4.cs
Reply With Quote
Thanked by:
  #33 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224



cory View Post
it wiped out because it try to draw region on price panel you need to tell it 'no'
...
DrawOnPricePanel = false;
...

you code will work but it's kind of heavy for this job, here is a sample using one data series only.

Thank you very much for this!

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote
  #34 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090

remember to turn it off so that you can draw arrows, vertical lines on price panel again
...
DrawOnPricePanel = true;
...

Reply With Quote
  #35 (permalink)
 keepdchange 
California
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: ES, Currency Futures (6E)
Posts: 157 since Sep 2009
Thanks Given: 78
Thanks Received: 10

Guys....I am very glad I started this thread. I just needed a simple clarification and it is ending up to be a thread for creation of a revised and more useful indicator....excellent work Zeller, Wizard, Cory and everyone else contributing. This just shows how powerful this forum can get (Thanks Mike).

Thanks
-Keep

Started this thread Reply With Quote
  #36 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224


cory View Post
remember to turn it off so that you can draw arrows, vertical lines on price panel again
...
DrawOnPricePanel = true;
...

Cory, Just so I understand:

DrawOnPricePanel = false;
....then the code for coloring the region
...then
DrawOnPricePanel = true; (to allow for the drawing of arrows, lines, etc)

So it turn 'off' just long enough to color the region, then turn it back 'on' for line, arrows, etc - each new bar cycle?

Is that how it should look? As always, a big THANK YOU.

p.s. Maybe you'll make a programmer out of me yet!

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote
  #37 (permalink)
 
cory's Avatar
 cory 
virginia
 
Experience: Intermediate
Platform: ninja
Trading: NQ
Posts: 6,098 since Jun 2009
Thanks Given: 877
Thanks Received: 8,090


TheWizard View Post
Cory, Just so I understand:

DrawOnPricePanel = false;
....then the code for coloring the region
...then
DrawOnPricePanel = true; (to allow for the drawing of arrows, lines, etc)

So it turn 'off' just long enough to color the region, then turn it back 'on' for line, arrows, etc - each new bar cycle?

Is that how it should look? As always, a big THANK YOU.

p.s. Maybe you'll make a programmer out of me yet!

yes, you got it.
yes, thats the idea behind of why I cited sources and examples instead of merely giving you the codes.

Reply With Quote
Thanked by:
  #38 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224


perryg View Post
Yes that is correct

Perry,

I just posted the SMI5 to the downloads section with the enhancements you requested. Cory was kind enough to guide me through & contribute the code that made this possible.

After all, it's what you learn AFTER you know it all, that counts!
Reply With Quote
  #39 (permalink)
 keepdchange 
California
 
Experience: Intermediate
Platform: Ninjatrader
Broker: Zen Fire
Trading: ES, Currency Futures (6E)
Posts: 157 since Sep 2009
Thanks Given: 78
Thanks Received: 10

Wizard, I just downloaded and applied the SMI5 to a 6E chart. For some reason, I can not get the arrows or the background color to paint on the price bar. I have the paint background to "true" and show arrows as "true", also.

Appreciate any help.

Thanks,
Keep

Started this thread Reply With Quote
  #40 (permalink)
 
TheWizard's Avatar
 TheWizard 
Houston, TX
Market Wizard
 
Experience: Intermediate
Platform: NinjaTrader
Broker: Optimus Futures, AMP, CQG
Trading: 6E
Posts: 1,731 since Jun 2009
Thanks Given: 517
Thanks Received: 4,224



keepdchange View Post
Wizard, I just downloaded and applied the SMI5 to a 6E chart. For some reason, I can not get the arrows or the background color to paint on the price bar. I have the paint background to "true" and show arrows as "true", also.

Appreciate any help.

Thanks,
Keep

Keep,

Go into the indicator preferences panel & under OFFSET, change it to 0.001.

The background coloring occurs in the indicator panel (#2, #3, etc) - not the main price bar panel.

If you want to paint the price bar panel, add another SMI5, change all the plots (lines, dots, histogram bars, etc) to "TRANSPARENT" and then put the indicator in PANEL 1. That way ONLY the background coloring will occur & only in panel 1 (Pricebar panel).

I've attached a screenshot of what my 6E looks like with the OFFSET set to 0.001 for the arrows, both on the slow and the fast SMI5. Hope that helps.

After all, it's what you learn AFTER you know it all, that counts!
Attached Thumbnails
Click image for larger version

Name:	6E.jpg
Views:	330
Size:	123.7 KB
ID:	9245   Click image for larger version

Name:	6E settings.jpg
Views:	228
Size:	90.5 KB
ID:	9246  
Reply With Quote
Thanked by:




Last Updated on July 28, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts