NexusFi: Find Your Edge


Home Menu

 





Highest() and Lowest() Returning Same Values


Discussion in Sierra Chart

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




 
Search this Thread
  #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?
EA
Platforms and Indicators
My Rant with AMP Futures
Trading Reviews and Vendors
Datafeed for Atas
Platforms and Indicators
No book, only a stair: journaling fills where price move …
Cryptocurrency
requesting .nrd replay files from 2026 spy and qqq
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Mes vs MNQ
6 thanks
NexusFi site changelog and issues/problem reporting
5 thanks
BERN ALGOS algo trading journal
3 thanks
TopStep Trader disappointment
2 thanks
Johnnys Journal
2 thanks
  #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


© 2026 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 - Downloads - Top
no new posts