NexusFi: Find Your Edge


Home Menu

 





Trying to create a study


Discussion in Sierra Chart

Updated
      Top Posters
    1. looks_one Mickey Caine with 5 posts (0 thanks)
    2. looks_two Jolew with 3 posts (1 thanks)
    3. looks_3 trendfriendpa with 2 posts (1 thanks)
    4. looks_4 Nicolas11 with 2 posts (1 thanks)
      Best Posters
    1. looks_one cory with 1 thanks per post
    2. looks_two Nicolas11 with 0.5 thanks per post
    3. looks_3 trendfriendpa with 0.5 thanks per post
    4. looks_4 Jolew with 0.3 thanks per post
    1. trending_up 5,053 views
    2. thumb_up 4 thanks given
    3. group 5 followers
    1. forum 15 posts
    2. attach_file 0 attachments




 
Search this Thread

Trying to create a study

  #11 (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


Big Mike View Post
I have never looked at SC code. But am curious, what is "SG1" - other than a pretty good TV show

Mike

an indicator can has many parms, SG1 = subgrapth 1 = first parm.
ps: should have said many outputs, SG1 = first output.

Reply With Quote
The following user says Thank You to cory for this post:

Can you help answer these questions
from other members on NexusFi?
NexusFi Journal Challenge - April 2024
Feedback and Announcements
My NT8 Volume Profile Split by Asian/Euro/Open
NinjaTrader
ZombieSqueeze
Platforms and Indicators
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Retail Trading As An Industry
58 thanks
Battlestations: Show us your trading desks!
50 thanks
NexusFi site changelog and issues/problem reporting
47 thanks
GFIs1 1 DAX trade per day journal
32 thanks
What percentage per day is possible? [Poll]
31 thanks

  #12 (permalink)
 trendfriendpa 
philadelphia USA
 
Experience: Intermediate
Platform: TOS, Webull, Ninja 8
Broker: TD Ameritrade
Trading: options, ES/NQ futures, stocks
Posts: 79 since May 2011
Thanks Given: 54
Thanks Received: 53


Big Mike View Post
I have never looked at SC code. But am curious, what is "SG1" - other than a pretty good TV show

Mike

SG1 means subgraph 1 that is about the only thing I know when it comes to Sierra Chart other than sc. meaning sierra chart

Reply With Quote
The following user says Thank You to trendfriendpa for this post:
  #13 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769


@Big Mike,


Big Mike View Post
I have never looked at SC code. But am curious, what is "SG1" - other than a pretty good TV show

In addition to the above answers, below please find a minimal code (17 lines) which plots... the close of each bar (in a sub-panel).

There is an unique plot (subgraph): SG1.

In the code, "SG1" does not appear as such, but is referred to as sc.Subgraph[0] (in bold).

Nicolas

 
Code
#include "sierrachart.h"

SCDLLName("Example DLL") 

SCSFExport scsf_Example(SCStudyGraphRef sc)
{
	if ( sc.SetDefaults ) {
		sc.GraphName = "Example";
		sc.FreeDLL = 1;
		sc.AutoLoop = 1;  
		sc.Subgraph[0].Name = "Copy of the price";
		sc.Subgraph[0].DrawStyle = DRAWSTYLE_LINE;
		return;
	}
	
	sc.Subgraph[0][sc.Index] = sc.Close[sc.Index];
}

Visit my NexusFi Trade Journal Reply With Quote
The following user says Thank You to Nicolas11 for this post:
  #14 (permalink)
 trendfriendpa 
philadelphia USA
 
Experience: Intermediate
Platform: TOS, Webull, Ninja 8
Broker: TD Ameritrade
Trading: options, ES/NQ futures, stocks
Posts: 79 since May 2011
Thanks Given: 54
Thanks Received: 53

I believe SG1 translates to SierraGraph1 (which is the main chart)

SG2 - is the first subgraph under the chart
SG3 - is the second subgraph under the chart

Reply With Quote
  #15 (permalink)
 
Nicolas11's Avatar
 Nicolas11 
near Paris, France
 
Experience: Beginner
Platform: -
Trading: -
Posts: 1,071 since Aug 2011
Thanks Given: 2,232
Thanks Received: 1,769

@trendfriendpa ,

I do not think so.
As explained above, SGn refers to the n-th plot on the chart.
It also documented there: Study/Chart Alerts And Scanning - Sierra Chart

Nicolas

Visit my NexusFi Trade Journal Reply With Quote
  #16 (permalink)
 jdrower 
Alameda, CA
 
Experience: Intermediate
Platform: Sierracharts
Trading: NQ
Posts: 45 since Oct 2011
Thanks Given: 177
Thanks Received: 30

For Example:
With the indicator CCI
SG1 = CCI line (value determined by user)
SG3 = Line Value such as +100 (value determined by user)
SG4 = Line Value such as -100 (value determined by user)

If SG1 was above SG3 one bar ago (a.k.a [-1] ), and assuming the CCI sudy is ID1, then a cross-over of the CCI from above +100 (Line Value SG3) to below it on the current bar, can be written :

=and(ID1.SG1[-1]>ID1.SG3[-1],ID1.SG1[0]<ID1.SG3[0])

for an alert such as
auditory,
a colored bar (as in candlestick),
background color (behind candlestick),
arrow down etc.

To learn best about alerts, look at any offerings from Tom Gilb.

Reply With Quote





Last Updated on December 3, 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