NexusFi: Find Your Edge


Home Menu

 





Highest() and Lowest() Returning Same Values


Discussion in Sierra Chart

Updated
    1. trending_up 939 views
    2. thumb_up 0 thanks given
    3. group 1 followers
    1. forum 3 posts
    2. attach_file 0 attachments




 
Search this Thread

Highest() and Lowest() Returning Same Values

  #1 (permalink)
Nube
Minneapolis Minnesota
 
Posts: 24 since Jul 2019
Thanks Given: 0
Thanks Received: 13

Getting the same values from the following. I'm sure the problem is with my knowledge - I'm a total n00b with Sierra.

 
Code
	SCFloatArrayRef ll = sc.Lowest(sc.BaseData[SC_LOW], sc.Subgraph[0], 20);
	SCFloatArrayRef hh = sc.Highest(sc.BaseData[SC_HIGH], sc.Subgraph[0], 20);

I was trying to make a stochastic as something simple to learn with but couldn't pull it off.

The Highest() and Lowest() looked like obvious choices to me. I have done a fair amount of scripting in Think Or Swim and use their version of those on the regular but am failing miserably here. Sierra also has a stock highest high / lowest low study which I believe could also be used but haven't figured out how to reference other studies / call functions from other studies.

I've tried searching the Sierra site and the youtube but haven't found what I need.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Exit Strategy
NinjaTrader
Build trailing stop for micro index(s)
Psychology and Money Management
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Better Renko Gaps
The Elite Circle
 
  #3 (permalink)
Tangy
Vancouver, Canada
 
Posts: 3 since Dec 2018
Thanks Given: 18
Thanks Received: 1



Nube View Post

 
Code
SCFloatArrayRef ll = sc.Lowest(sc.BaseData[SC_LOW], sc.Subgraph[0], 20);

SCFloatArrayRef hh = sc.Highest(sc.BaseData[SC_HIGH], sc.Subgraph[0], 20);


Hi! You're storing the result in the same subgraph. Try:

 
Code
SCFloatArrayRef ll = sc.Lowest(sc.BaseData[SC_LOW], sc.Subgraph[0], 20);

SCFloatArrayRef hh = sc.Highest(sc.BaseData[SC_HIGH], sc.Subgraph[1], 20);

Reply With Quote
  #4 (permalink)
Nube
Minneapolis Minnesota
 
Posts: 24 since Jul 2019
Thanks Given: 0
Thanks Received: 13


Tangy View Post
Hi! You're storing the result in the same subgraph. Try:

 
Code
SCFloatArrayRef ll = sc.Lowest(sc.BaseData[SC_LOW], sc.Subgraph[0], 20);

SCFloatArrayRef hh = sc.Highest(sc.BaseData[SC_HIGH], sc.Subgraph[1], 20);


Thank you! I clearly don't know what a Subgraph is yet.Got some homework to do.

Reply With Quote




Last Updated on July 7, 2019


© 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