NexusFi: Find Your Edge


Home Menu

 





how to get the previous value of indicator like "prev" in Metastock?


Discussion in EasyLanguage Programming

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




 
Search this Thread
  #1 (permalink)
duzers
Poland
 
Posts: 2 since Sep 2010
Thanks Given: 0
Thanks Received: 0

Metastock:

d:=If(C>Ref(H,-1), Min(L,Ref(L,-3)) , If(C<Ref(L,-1), Max((H,Ref(H,-3)) ,PREV));


,and what I do in Multicharts:
 
Code
vars: war1(0);
vars: war2(0);

war1=minlist(L,L[3]);
war2=maxlist(H,H[3]);

if C>H[1] then 
    begin
    Plot1( war1, "A" ) ;
    end
else begin
if C<L[1] then
    begin
    plot1(war2,"A");
    end
else (previous?)
THX


Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Sundays Verdict: Lebanon Locked at 99.85% as Iran June 7 …
Prediction Markets & Event Contracts
Hormuz Normalization Collapses to 19.5% -- Iran Regime F …
Prediction Markets & Event Contracts
I Have a Thing Called Iran -- Trump Stays in DC as Airsp …
Prediction Markets & Event Contracts
Without Pulisic, USA 61.5% Live vs. Australia -- France …
Prediction Markets & Event Contracts
$4.5M Floods Russia Nuclear Contract in 24 Hours -- Krem …
Prediction Markets & Event Contracts
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
NexusFi site changelog and issues/problem reporting
15 thanks
Darmok and Jalad at Tanagra
3 thanks
Big Mike in Ecuador
1 thanks
30 Sessions
1 thanks
  #3 (permalink)
tarantino
Willowbrook, IL
 
Posts: 32 since Sep 2010
Thanks Given: 71
Thanks Received: 39


Something like this:

 
Code
Value.Set(CurrentBar == 0 ? Median[0] : Close[0] <  Low[1] ? MAX(High, 3)[0] : Close[0] > High[1] ? MIN(Low, 3)[0] : Value[1]);


Reply With Quote
  #4 (permalink)
duzers
Poland
 
Posts: 2 since Sep 2010
Thanks Given: 0
Thanks Received: 0

But, it's not syntax of Multicharts, right?


Reply With Quote
  #5 (permalink)
tarantino
Willowbrook, IL
 
Posts: 32 since Sep 2010
Thanks Given: 71
Thanks Received: 39


duzers View Post
But, it's not syntax of Multicharts, right?

Oh, sorry, haven't noticed this is about MultiCharts. - Thought it's Ninja question


Reply With Quote




Last Updated on October 1, 2010


© 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