NexusFi: Find Your Edge


Home Menu

 





Editing an existing IRectangle


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one mk77ch with 2 posts (0 thanks)
    2. looks_two Big Mike with 1 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 cory with 1 posts (0 thanks)
    1. trending_up 1,535 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 5 posts
    2. attach_file 0 attachments




 
Search this Thread

Editing an existing IRectangle

  #1 (permalink)
 
mk77ch's Avatar
 mk77ch 
Switzerland
 
Experience: Advanced
Platform: NinjaTrader
Broker: Dorman
Trading: Currency Futures, ES
Posts: 131 since Oct 2010
Thanks Given: 27
Thanks Received: 349

hey guys,

is there a possibility to edit an existing IRectangle Object on a chart?
i tried something like this without any success:

 
Code
foreach(IDrawObject o in DrawObjects)
{
    if(o.DrawType == DrawType.Rectangle)
    {
        IRectangle rec = (IRectangle)o;
        
        if(rec.EndTime < Time[0])
        {
            rec.EndTime = Time[0];
        }
    }
}
the idea is to create a little helper indicator which automatically expands my drawn support / resistance areas.

thank you and cheers,
mike

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
MC PL editor upgrade
MultiCharts
Trade idea based off three indicators.
Traders Hideout
Exit Strategy
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Diary of a simple price action trader
26 thanks
Just another trading journal: PA, Wyckoff & Trends
21 thanks
My NQ Trading Journal
19 thanks
Tao te Trade: way of the WLD
16 thanks
HumbleTraders next chapter
9 thanks
  #3 (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


you may find the code you need in this thread I think

Reply With Quote
  #4 (permalink)
 
mk77ch's Avatar
 mk77ch 
Switzerland
 
Experience: Advanced
Platform: NinjaTrader
Broker: Dorman
Trading: Currency Futures, ES
Posts: 131 since Oct 2010
Thanks Given: 27
Thanks Received: 349

hey cory,

thank you for your reply but i cant find any reference in that thread.
the problem is, that if i draw a rectangle for a support or resistance area by using the drawing tools and then try to edit that rectangle in ninjascript, i am able to get the values but i cant edit the object itself.

if i delete the existing object and replace it with a new one created by the indicator, it becomes a drawobject of the indicator and i cant just delete it by hand.

any ideas?

Started this thread Reply With Quote
  #5 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,440 since Jun 2009
Thanks Given: 33,207
Thanks Received: 101,599


mk77ch View Post
hey cory,

thank you for your reply but i cant find any reference in that thread.
the problem is, that if i draw a rectangle for a support or resistance area by using the drawing tools and then try to edit that rectangle in ninjascript, i am able to get the values but i cant edit the object itself.

if i delete the existing object and replace it with a new one created by the indicator, it becomes a drawobject of the indicator and i cant just delete it by hand.

any ideas?

You might trying mentioning @cory

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
  #6 (permalink)
 MooreTech 
Orlando, Florida
 
Experience: Advanced
Platform: NinjaTrader, TradeStation, MultiCharts, eSignal, MetaTrader
Trading: ES
Posts: 57 since Aug 2010
Thanks Given: 6
Thanks Received: 73


mk77ch View Post
hey cory,

thank you for your reply but i cant find any reference in that thread.
the problem is, that if i draw a rectangle for a support or resistance area by using the drawing tools and then try to edit that rectangle in ninjascript, i am able to get the values but i cant edit the object itself.

if i delete the existing object and replace it with a new one created by the indicator, it becomes a drawobject of the indicator and i cant just delete it by hand.

any ideas?

If you set AllowRemovalOfDrawObjects to true in the Initialize method, you will be able to manually delete the draw objects.

AllowRemovalOfDrawObjects

If you have any questions about our products or services please contact me via Private Message
Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on August 27, 2013


© 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