NexusFi: Find Your Edge


Home Menu

 





question: do something IF current bar (or previous bar) is LLV


Discussion in Platforms and Indicators

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




 
Search this Thread
  #1 (permalink)
choubix
Bangkok + Thailand
 
Posts: 10 since Aug 2012
Thanks Given: 2
Thanks Received: 0

Hi,

I would like to calculate the ratio between MinL and MaxH only if MinL is the current bar (or the one before).

MinL and MaxH are defined as follows.

MaxH = HHV(Mom, Len);
MinL = LLV(Mom, Len);

Mom is a lengthy formula defining momentum and Len = 5 bars

I tried IIF and If statements with the following syntax to compare but I cannot get it to work.

Would anybody have an idea on how to do that please?

Thanks a bunch


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Iran Lebanon Problem Kills Switzerland Talks, Brent at $ …
Prediction Markets & Event Contracts
Trump Media to sell instant access to market-moving soci …
Traders Hideout
Czechia Live at 52.5% as England Rides 4-2 Wave to Co-Fa …
Prediction Markets & Event Contracts
Daytrading to swingtrading
Traders Hideout
No book, only a stair: journaling fills where price move …
Cryptocurrency
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Want your NinjaTrader indicator created, free?
5 thanks
Afternoon-close session
1 thanks
Franks Trading Journey
1 thanks
Denied 20K payouts: Alpha Futures
1 thanks
FootPrintV2 Chart for NT8
1 thanks
  #2 (permalink)
bob303
paris France
 
Posts: 5 since Mar 2014
Thanks Given: 1
Thanks Received: 1

Hi,
try this :

Mom = ROC(C,1) ;
Len = 5;

MaxH = HHV(Mom, Len);
MinL = LLV(Mom, Len);

ratio_MaxMin = IIf( (mom == Minl) OR (Ref(mom,-1) == Minl) , 100* ( MaxH / MinL ),0);

Plot( ratio_MaxMin, "ratio_MaxMin", colorBlue, styleLine|styleThick);


Reply With Quote




Last Updated on April 9, 2015


© 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