log in     sign up for free
 
The elements of good trading are: 1. Cutting losses, 2. Cutting losses, and 3. Cutting losses. If you can follow these three rules, you may have a chance.
Ed Seykota
 
 
Home
systems (284)
 
Special offer: buy MetaStock (try for free)   |   Reuters QuoteCenter Real-Time Data (get a free month)   |   EOD Data
 
Formula Library
 
AmiBroker
MetaTrader
MetaStock
TradeStation
Wealth-Lab
NinjaTrader
 
add your formula
System Library
 
 
Account login
Your email:
Password:
 
Log in
New to s4t? Sign up.
If you forgot your password click here.
Search the Web
 
Custom Search

MATCH

Formula for: TradeStation

indicator


 

 

Views:  1331

Added: June 16, 2008
 
Rate this code:  Rate: 1 Rate: 2 Rate: 3 Rate: 4 Rate: 5
This formula has not been rated yet
 

email this link

 
 
Tags: TradeStation, indicator
 
Your Ad Here
If I understand your question you can either set MaxBarsBack in your indicator or you can wrap the whole thing in conditional which will insure that execution does not take place until you have the required lookback.

"if BarNumber > Length then BEGIN
For ....
END;

Earl Adamy

-----Original Message-----
From: Mike
To: 'omega-list@xxxxxxxxxx'
Date: Monday, March 30, 1998 11:20 AM
Subject: a Dumb ELA question.

Thanks for the help over the last month guys,

I am trying to write an ela code that will compare an variable no. of the most recent bars and compare them to all that i have loaded...

I thought that somthing like:



Type : Indicator, Name : MATCH
INPUT:
LENGTH(2),
PERCENT(5);

vars:
dc(o),
dc1(o),
dh(0),
dh1(0),
dl(0),
dl1(0),
YY(0),
EE(0),
RR(10000),
A1(0),
A2(0),
A3(0),
FF(0);

BEGIN;
YY=0;

FOR EE = 1 TO LENGTH BEGIN;
FF= EE-1;
DC = (close - open)/open*RR;
DC1 = (close[FF]-open[FF])/open[FF]*RR;
DH = (high - open)/open*RR;
DH1= (high[FF]-open[FF])/open[FF]*RR;
DL = (low-open)/open*RR;
DL1 = (low[FF]-open[FF])/open[FF]*RR;
A1= (DC-DC1) ;
A2= (DH-DH1) ;
A3= (DL-DL1) ;
IF ABSVALUE(A1)>=PERCENT THEN YY=YY+1;
IF ABSVALUE(A2)>=PERCENT THEN YY=YY+1;
IF ABSVALUE(A3)>= PERCENT THEN YY=YY+1;
END;

plot2(YY*10,"MATCH");
END;






would give me what i wanted, alas no....
I am guessing that i need to alter the MaxBarsBack, but how do i do this through ELA?.. the manual doesn't seem to give an example...

Thanks,
Mike

 

 



Code:

Type : Indicator, Name : MATCH
INPUT:
LENGTH(2),
PERCENT(5);

vars:
dc(o),
dc1(o),
dh(0),
dh1(0),
dl(0),
dl1(0),
YY(0),
EE(0),
RR(10000),
A1(0),
A2(0),
A3(0),
FF(0);

BEGIN;
YY=0;

FOR EE = 1 TO LENGTH BEGIN;
FF= EE-1;
DC = (close - open)/open*RR;
DC1 = (close[FF]-open[FF])/open[FF]*RR;
DH = (high - open)/open*RR;
DH1= (high[FF]-open[FF])/open[FF]*RR;
DL = (low-open)/open*RR;
DL1 = (low[FF]-open[FF])/open[FF]*RR;
A1= (DC-DC1) ;
A2= (DH-DH1) ;
A3= (DL-DL1) ;
IF ABSVALUE(A1)>=PERCENT THEN YY=YY+1;
IF ABSVALUE(A2)>=PERCENT THEN YY=YY+1;
IF ABSVALUE(A3)>= PERCENT THEN YY=YY+1;
END;

plot2(YY*10,"MATCH");
END;

 





Source: http://www.purebytes.com

 

View similar (indicator for TradeStation):

StochRSI
Balance Of Power (BOP)
Stochastic S&C Indicator
DotDisp
Reverse Engineering
Phase Calculation
Ichimoku Charts
Cosine IFM
CCI Predict
MACD\\Rise\\Fall
...
 
 
all formulas for TradeStation
all formulas

 

 

Email to friend

Top

 

     
However we try to maintain hiqhest possible level of service - most formulas, oscillators, indicators
and systems are submitted by anonymous users.
Therefore S4T™ does not take any responsibility for it's quality.
If you use any of this information, use it at your own risk. You are responsible for your own trading decisions.
Be sure to verify that any information you see on these pages is correct, and is applicable to your particular trade.
In no case will S4T™ be responsible for your trading gains or losses.
 
Privacy note | (c) copyrights systems4trading.com 2006-2012