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,450 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?
Fabrication or Framework? Irans Denied MOU Explains the …
Prediction Markets & Event Contracts
BofA Projects $1.1 Trillion in Sports Event Contracts -- …
Prediction Markets & Event Contracts
Prediction Markets Expiry Day: Trump Eyes War Exit, $230 …
Prediction Markets & Event Contracts
US Treasury Weighs Direct Oil Futures Market Interventio …
Commodities
Zytrade: Devin Brady, CEO - Ask Me Anything (AMA)
Brokers
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Sober Journey With S&P
24 thanks
2026 Jlab journal
10 thanks
Lady Vols Primer: Trading Volatility Journal
7 thanks
Algo automated / semi-automated trading anyone?
6 thanks
Trying to learn Volume and price action correlation
5 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