LineNumber / sc.LineExists(), ... - Sierra Chart Programming | futures io social day trading
futures io futures trading

LineNumber / sc.LineExists(), ...
Updated: Views / Replies:929 / 2
Created: by funk101 Attachments:0

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 100,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

Thread Tools Search this Thread

LineNumber / sc.LineExists(), ...

  #1 (permalink)
Elite Member
Margate, Fl.
Futures Experience: Advanced
Platform: SierraCharts
Favorite Futures: Futures
Posts: 28 since Jun 2009
Thanks: 5 given, 5 received

LineNumber / sc.LineExists(), ...

I'm auto-drawing ellipses, I have:

s_UseTool EllipseTool;
EllipseTool.AddMethod = UTAM_ADD_OR_ADJUST;

and when the tool gets drawn I set:

int uid = rand();
EllipseTool.LineNumber = uid;

The Ellipse drawing starts and then a couple of bars later, when certain parameters are met, I want to "close" the Ellipse.
How do I call *that* particular Ellipse?

I have this, and works about 90%:

if (sc.LineExists(sc.ChartNumber, uid)

several "ellipses" are drawn and closed as expected, however one seems to be hanging from the beginning of the chart to the current index. Which leads me to believe the code has missed this particular LineNumber, or something. Which then leads me to believe that I need more control and how to call each generated Ellipse. Any ideas?

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)
Elite Member
Madison, WI
Futures Experience: Advanced
Platform: Sierra Charts, ALT
Favorite Futures: ES
aslan's Avatar
Posts: 614 since Jan 2010
Thanks: 343 given, 1,090 received

Generally you want to structure your IDs based on what you are trying to do. Using rand() is not the best way to go about it for a number of reasons (though it could work if you have a small number of drawings you are tracking). I usually structure my id using something like this:

int LineID = StudyConst*1000000 + DrawingType*10000 + sc.Index*100 + XYZ;

The above is just an example (modify for your needs). Basically depending what you are trying to do dictates how you want to make the drawing unique and how easy it is to look up again. It really depends how many "active" drawings you have that you need to modify later.

To modify a drawing, you need to save/reuse the id. So in your example, the uid should have been saved to a persist var so you can use it later when you look the drawing up. If you did not save it properly or overwrote it, then your lookup fails and you can not close your original drawing.

Reply With Quote


futures io > > > > > LineNumber / sc.LineExists(), ...

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

September Journal Challenge (sponsored by TopstepTrader)


Battlestations! Win $947 in prizes for showing us your trading desk!


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using the Perry Method with SC gloveday Sierra Chart 5 February 9th, 2012 05:26 AM
Repost: SC Advantage vs NT Advantages puma Sierra Chart 3 January 4th, 2012 10:57 PM
[Other]       100 volume - NT vs MC vs SC Jonson Platforms and Indicators 6 September 26th, 2011 12:02 PM
Couple of SC (C++) programming questions vegasfoster Sierra Chart Programming 9 July 21st, 2011 04:29 PM
D9 Conversion from NT to SC vegasfoster The Elite Circle 9 March 1st, 2011 09:41 PM

All times are GMT -4. The time now is 11:19 PM. (this page content is cached, log in for real-time version)

Copyright © 2018 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432,
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 2018-10-23 in 0.09 seconds with 14 queries on phoenix