![]() |
Home
| Download
| Help/FAQ
| Data/Trade Services
|
|
#1
|
||||
|
||||
|
i found the Narrow Range study, but is there an equivalent Wide Range indicator? i've looked in the studies but don't see it listed under 'Wide Range' and didn't see anything else that looked similarly named.
__________________
thanks and take care - derek |
|
#2
|
|||
|
|||
|
Are you looking for outside bar?
__________________
The above commentary has been contributed by an SC user. |
|
#3
|
||||
|
||||
|
well, actually, i'm looking for the WR7 which is the opposite of the NR7. it's just the widest bar (which won't necessarily be an outside bar) in n bars, while the NR is the narrowest bar (which won't necessarily be an inside bar) in n bars. Ideally, i'd like to see a single study with NR/WR inputs.
__________________
thanks and take care - derek |
|
#4
|
|||
|
|||
|
ah, ok. Probably an easy study to create, though I'm not sure of the most efficient way.
__________________
The above commentary has been contributed by an SC user. |
|
#5
|
||||
|
||||
|
Quote:
__________________
thanks and take care - derek |
|
#6
|
|||
|
|||
|
lol, that's about the extent of my knowledge as well. I looked for the code for the NR study but didn't see it. That'll get you 90% of the way to WR. I'm sure it's easy to do, but to make it adjustable on the fly and not hardcode the lookback period would require a little effort for me.
__________________
The above commentary has been contributed by an SC user. Last edited by SgtJ; 11-03-2008 at 02:10 AM. |
|
#7
|
||||
|
||||
|
thx for looking. agreed. i'm thinking with a little reverse engineering i might be able to mutate the Narrow Range study into a NR/WR custom. is the CPP code for the NR study available to SC users?
__________________
thanks and take care - derek Last edited by omni72; 11-03-2008 at 01:21 AM. |
|
#8
|
|||
|
|||
|
Just thinking, you can always do something w/ the ATR study set to 1 period to generate your values.
__________________
The above commentary has been contributed by an SC user. |
|
#9
|
|||
|
|||
|
I just put something together (hardcoded), WR7...though not sure how to prevent consecutive positives.
http://www.sierrachart.com/userimage...ploadImage.png
__________________
The above commentary has been contributed by an SC user. Last edited by SgtJ; 11-03-2008 at 03:11 AM. |
|
#10
|
||||
|
||||
|
Quote:
The difference between the current high and the current low The difference between the current high and the previous close The difference between the current low and the previous close in order to determine the 'true range'. meanwhile, in a W/NR-n study it would just tell me which bars over the last n bars had the biggest and smallest ranges (using H/L only). as always, thanks for your input.
__________________
thanks and take care - derek |
|
#11
|
|||
|
|||
|
This is crude, but may help
CPP Code:
__________________
The above commentary has been contributed by an SC user. |
|
#12
|
|||
|
|||
|
Sierra,
is there a study for this by now? Widest bar from last x bars? Thanks |
|
#13
|
||||
|
||||
|
We do not think so. You will need to create this one if you require it.
__________________
Thank you, Cheers Mate, Danke, Merci, Gracias, Love Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy. |
|
#14
|
|||
|
|||
|
thx
|
|
#15
|
|||
|
|||
|
Quote:
thx |
|
#16
|
|||
|
|||
|
Sierra team,
please help me with that code (that was created from sgtj above): ------ SCSFExport scsf_WideRangeBar(SCStudyGraphRef sg) { if (sg.SetDefaults) { sg.GraphName = "Wide Range Bar"; sg.StudyDescription = "Wide Range Bar"; sg.FreeDLL = 0; sg.DrawZeros = 0; // false sg.GraphRegion = 0; sg.Subgraph[0].Name = "WRB"; sg.Subgraph[0].DrawStyle = DRAWSTYLE_COLORBAR; sg.Subgraph[0].LineWidth = 1; sg.Subgraph[0].PrimaryColor = RGB(255,128,0); sg.AutoLoop = 1; return; } SCFloatArrayRef High = sg.BaseDataIn[SC_HIGH]; SCFloatArrayRef Low = sg.BaseDataIn[SC_LOW]; SCFloatArrayRef Out = sg.Subgraph[0].Data; if ((High[sg.Index]-Low[sg.Index])>(High[sg.Index - 1]-Low[sg.Index - 1])&&(High[sg.Index]-Low[sg.Index])>(High[sg.Index - 2]-Low[sg.Index - 2])&&(High[sg.Index]-Low[sg.Index])>(High[sg.Index -3]-Low[sg.Index -3])&&(High[sg.Index]-Low[sg.Index])>(High[sg.Index -4] - Low[sg.Index -4])&&(High[sg.Index]-Low[sg.Index])>(High[sg.Index -5]-Low[sg.Index -5])&&(High[sg.Index] - Low[sg.Index])>(High[sg.Index -6] - Low[sg.Index -6])&&(High[sg.Index] - Low[sg.Index])>(High[sg.Index -7]-Low[sg.Index -7])) Out[sg.Index] = High[sg.Index]; else Out[sg.Index] = 0; } ---------- If I enter these into Wordpad and save it say as widestbar.cpp and try to build Advanced study DLL from SIerra, it doesn't work. I save the file in correct directory. What must I do differently? Thank you. |
|
#17
|
|||
|
|||
|
if you look at the cpp sample studies.cpp you know that you need a header like this
Code:
/*****************************************************************************
This is a C++ source code file. This file contains example Advanced Custom
Study functions. It also contains functions for some built-in studies
in Sierra Chart.
*****************************************************************************/
#include "sierrachart.h"
/****************************************************************************/
SCDLLName("Sierra Chart Custom Studies and Examples")
/*============================================================================
This example code calculates a simple moving average (30 period by
default).
----------------------------------------------------------------------------*/
// SCSFExport scsf_SimpMovAvg(SCStudyGraphRef sc)
Last edited by nkhoi; 07-29-2010 at 03:19 PM. |
|
#18
|
|||
|
|||
|
thanks alot
|
|
#19
|
||||
|
||||
|
We will include this study in the next release as a user contributed study. You will be able to find it under:
Analysis >> Studies >> Add Custom Study >> Sierra Chart Custom Studies and Examples >> (name of study)
__________________
Thank you, Cheers Mate, Danke, Merci, Gracias, Love Sierra Chart Support - Engineering Level Your definitive source for support. Other responses are from users. If possible please keep your questions brief and to the point. Please be aware of support policy. |
|
#20
|
|||
|
|||
|
great, thanks
|