Howto get a DRAWING_HORIZONTALLINE color ? - Sierra Chart Programming | futures io social day trading
futures io futures trading


Howto get a DRAWING_HORIZONTALLINE color ?
Updated: Views / Replies:488 / 12
Created: by bluewave65 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 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
 

Howto get a DRAWING_HORIZONTALLINE color ?

  #1 (permalink)
Trading Apprentice
CZECH REPUBLIC
 
Futures Experience: Advanced
Platform: SIERRACHART
Broker/Data: AMP + CQG
Favorite Futures: US Indexes
 
Posts: 18 since Nov 2015
Thanks: 1 given, 0 received

Howto get a DRAWING_HORIZONTALLINE color ?

Hi,

is there a function in acsil to do that ?

Thanks
Dave

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
Haifa Israel
 
Futures Experience: Beginner
Platform: sierra chart
Broker/Data: Optimus Trading Group/Rithmic
Favorite Futures: es
 
Posts: 90 since Apr 2012
Thanks: 48 given, 65 received


Using Drawing Tools from an Advanced Custom Study - Sierra Chart
Using Drawing Tools from an Advanced Custom Study - Sierra Chart

example:

s_UseTool CustomToolName;
CustomToolName.Clear();
CustomToolName.AddAsUserDrawnDrawing = 1;
CustomToolName.ChartNumber = sc.ChartNumber;
CustomvName.DrawingType = DRAWING_HORIZONTALLINE;
CustomToolName.Color = //RGB Code or referfernce to a Subgraph's Color
CustomToolName.Width = //Integer or referfernce to a Subgraph's width
CustomToolName.BeginValue = sc.Close[sc.Indec];
sc.UseTool(CustomToolName);

Reply With Quote
The following 2 users say Thank You to yonatan for this post:
 
  #4 (permalink)
Trading Apprentice
CZECH REPUBLIC
 
Futures Experience: Advanced
Platform: SIERRACHART
Broker/Data: AMP + CQG
Favorite Futures: US Indexes
 
Posts: 18 since Nov 2015
Thanks: 1 given, 0 received

Thanks , but .


I don`t need a help for specify color for draw, but find-out which color was user by user by acsil .....

Reply With Quote
 
  #5 (permalink)
Determined
Lexington KY/USA
 
Futures Experience: Beginner
Platform: Sierra Chart,ToS
Broker/Data: TDA, OANDA,AMP/CQG
Favorite Futures: Looking for it/them
 
LDog's Avatar
 
Posts: 107 since Sep 2015
Thanks: 3,000 given, 126 received

I haven't used the drawing tools, but it may not be possible:
https://www.sierrachart.com/SupportBoard.php?ThreadID=5069

@ejtrader - did you ever find a way to do this?

Reply With Quote
 
  #6 (permalink)
Elite Member
England
 
Futures Experience: Advanced
Platform: SierraChart
 
Posts: 58 since Jul 2009
Thanks: 5 given, 56 received

I am sure there is a simple answer but I do not fully understand what you are trying to do. If you can ask your question differently, maybe I or someone else might be able to help.

Are you looking at some Acsil code or a line drawn by a study? Not sure.

Reply With Quote
 
  #7 (permalink)
Elite Member
Haifa Israel
 
Futures Experience: Beginner
Platform: sierra chart
Broker/Data: Optimus Trading Group/Rithmic
Favorite Futures: es
 
Posts: 90 since Apr 2012
Thanks: 48 given, 65 received

You can loop through all the Horizontal Lines that are on the chart and assign their values to a variable.

s_UseTool HorLine;
int i = 0;
While(sc.GetChartDrawing(0, DRAWING_HORIZONTALLINE, HorLine, i)){
int HorLineColor = HorLine.Color;
i++;
}
This example assigns the RGB color of each Horizontal Line on the chart to the integer HorLineColor .
At the end of the loop HorLineColor will hold the color value of the Horizolntal Line that was ldrawn last.
Not sure about the specifics of converting RGB (###,###,###) to an integer.

Reply With Quote
 
  #8 (permalink)
Trading Apprentice
CZECH REPUBLIC
 
Futures Experience: Advanced
Platform: SIERRACHART
Broker/Data: AMP + CQG
Favorite Futures: US Indexes
 
Posts: 18 since Nov 2015
Thanks: 1 given, 0 received

I need code or function ( if exist ) for get ( not SET ! ) color for each user line previously drawed by user`s ..

: DRAWING_HORIZONTALLINE


dave


Last edited by bluewave65; January 8th, 2017 at 03:48 AM.
Reply With Quote
 
  #9 (permalink)
Elite Member
Haifa Israel
 
Futures Experience: Beginner
Platform: sierra chart
Broker/Data: Optimus Trading Group/Rithmic
Favorite Futures: es
 
Posts: 90 since Apr 2012
Thanks: 48 given, 65 received

The code I gave you above (#7) does exactly that. But I just notices that the sc.GetChartDrawing() function was replaced with sc.GetUserDrawnChartDrawing()
Of course you will have to embed those lines into a full SC study code. Do you know how to do that?
Do you need the colors of the lines for programming purposes or you just want to know the colors ?

Reply With Quote
 
  #10 (permalink)
Elite Member
Haifa Israel
 
Futures Experience: Beginner
Platform: sierra chart
Broker/Data: Optimus Trading Group/Rithmic
Favorite Futures: es
 
Posts: 90 since Apr 2012
Thanks: 48 given, 65 received


Here is an example of a full code for a study that will write to the Message Log the color of every new Horizontal line that is manually added to the chart.

#include <windows.h>
#include "sierrachart.h"
//#include "..\..\ACS_Source\sierrachart.h"

SCDLLName("GetToolColor")

SCSFExport scsf_GetToolColor(SCStudyInterfaceRef sc)
{


if (sc.SetDefaults)
{
sc.GraphName = "GetToolColor";

sc.FreeDLL = 1;

sc.AutoLoop = 0; //Automatic looping is enabled.

return;
}

int& Previousi = sc.GetPersistentInt(1);
s_UseTool HorLine;
int i = 0;
while(sc.GetUserDrawnChartDrawing(0, DRAWING_HORIZONTALLINE, HorLine, i)){
unsigned int HorLineColor = HorLine.Color;
i++;
if(Previousi < i){
SCString str;
str.Format("HorLineColor = %i",HorLineColor);
sc.AddMessageToLog(str, 0);
}
}
Previousi = i;
}

Reply With Quote
The following 2 users say Thank You to yonatan for this post:

Reply



futures io > > > > > Howto get a DRAWING_HORIZONTALLINE color ?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

July Journal Challenge w/$1100 in prizes from TopstepTrader

July
 

An Afternoon with FIO member Softsoap

Elite only

Battlestations: Show us your trading desks and win $750 in prizes

August
 

Extended Ask Me Anything w/Brett Steenbarger

Elite only

Prototyping Python Strategies (part 3) w/Ran Aroussi

Elite only

Brannigan Barrett w/Axia Futures

Elite only

Introduction to Phillip Capital futures brokerage services

Aug TBD

How Monte Carlo Analysis Can Help Your Trading w/Kevin Davey

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
background color in watchlist lexion ThinkOrSwim 3 January 31st, 2017 11:06 PM
color zone mgregor Traders Hideout 2 August 10th, 2016 08:21 PM
ZeroLagHMA with color??? bugsbunny NinjaTrader Programming 11 July 20th, 2016 06:22 PM
Sierra Chart TPO RTH color ETH color GaryD Sierra Chart 2 April 26th, 2013 04:02 AM
Background color neilzep NinjaTrader 4 May 17th, 2011 10:58 PM


All times are GMT -4. The time now is 07:04 AM.

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-07-24 in 0.11 seconds with 19 queries on phoenix via your IP 54.156.56.73