I'm trying to figure out how to measure the difference between the previous and current CCI bar. Anyone who can help me with this problem?
Announcement
Collapse
No announcement yet.
Difference between values
Collapse
X
-
Hello finnhan,
The parameter that is passed to the getValue() method refers to the bar index for the CCI study. Currently, your dist1 calculation is the result of bar 0 - bar 0. Try changing the bar index reference for the second instance of getValue() to -1.
dist1= vCCI14_of_HLC3.getValue(0) - vCCI14_of_HLC3.getValue(-1);Jason K.
Project Manager
eSignal - an Interactive Data company
EFS KnowledgeBase
JavaScript for EFS Video Series
EFS Beginner Tutorial Series
EFS Glossary
Custom EFS Development Policy
New User Orientation
-
Still only CCI value
Thank you Jason. Did the changes, but it still only shows the current CCI value, and not the cci points diff between the current and previous cci bar.Attached Files
Comment
-
Hello finnhan,
Try the following.
dist1= vCCI14_of_HLC3.getValue(CCIStudy.CCI, 0) - vCCI14_of_HLC3.getValue(CCIStudy.CCI, -1);
or use the EFS2 cci() study.
dist1= cci(14, hlc3(), 0) - cci(14, hlc3(), -1);Jason K.
Project Manager
eSignal - an Interactive Data company
EFS KnowledgeBase
JavaScript for EFS Video Series
EFS Beginner Tutorial Series
EFS Glossary
Custom EFS Development Policy
New User Orientation
Comment
-
You're most welcome.Jason K.
Project Manager
eSignal - an Interactive Data company
EFS KnowledgeBase
JavaScript for EFS Video Series
EFS Beginner Tutorial Series
EFS Glossary
Custom EFS Development Policy
New User Orientation
Comment
Comment