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 4,555 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

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

  #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?
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Better Renko Gaps
The Elite Circle
use extra computer for optimisation
NinjaTrader
Quantum physics & Trading dynamics
The Elite Circle
 
  #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


© 2024 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 - Privacy Policy - Downloads - Top
no new posts