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,524 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?
April CPI Preview: +3.7% YoY Expected at 8:30 AM ET -- C …
Traders Hideout
Four New E-mini Futures Launch June 29 -- Russell 3000, …
Emini and Emicro Index
The 50/50 Paradox: Peace and Invasion Each at 20% -- Ira …
Prediction Markets & Event Contracts
Second Night of US Strikes Crushes Iran June 15 to 3.6% …
Prediction Markets & Event Contracts
Trump Media to sell instant access to market-moving soci …
Traders Hideout
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
8 thanks
Darmok and Jalad at Tanagra
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