Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
True Strength Indicator/Easy Language programming problem
I copied that exact 2 programs as mentioned above,and this is what I got:
The formula posted like this:
1#indicator "True Strength Indes", "Samples", "TSISample"
2
3// Function: TSI
4
5
6inputs:
7 Price(NumericSeries),
8 Raw(NumericSimple),
9 Smooth(NumericSimple),
10 U(NumericSimple);
11
12vars:
13 NetChg(0);
14
15 NetChg = Price - Price[1];
16
17Value1 = 100 * XAverage(XAverage(XAverage(NetChg,Raw),Smooth),U);
18Value2 = XAverage(XAverage(XAverage(AbsValue(NetChg),Raw),Smooth),U);
19
20if Value2 <> 0 then
21 TSI = Value1 / Value2
22else
23 TSI = 0;
24
25
26// Indicator: TSI
27
28
29{[SameTickOpt = True];}
30
31inputs:
32 Price(Close),
33 Raw(26),
34 Smoothed(12),
35 Signal(5),
36 OB(20),
37 OS(-20);
38
39Plot1(TSI(Price, Raw, Smoothed,1), "TSI");
40Plot2(XAverage(Plot1,signal),"XAvg ");
41Plot3(OB,"Overbought");
42Plot4(OS,"Oversold");
Compile Errors were:
21 Unknown symbol: TSI
21 Wrong sybmbol on left side: TSI
23 Unknown symbol: TSI
23 Wrong sybmbol on left side: TSI
32 Variable 'Price" is already defined
33 Variable 'Raw" is already defined
39 Unknown symbol: TSI
22 Cannot compile: True Strength Ind
I'm a newbie in tradestation and I don't know how to compile a function. Can you explain me?
Thanks
When you compile a function, you're simply creating a file with a series of calculations that is named as the function word/name. That way, you can simply reference that group/function in other files such as indicators and strategies, without having to include all the language.
Once you copy/paste the language into a new function you opened, you simply click on the green check icon. If it's error free, it will turn neutral color and save it and give you no errors or warnings at the bottom of the EL program.
Only then can other indicators and strategies that are written with this function in them know what you're trying to refer to in the language.
"A dumb man never learns. A smart man learns from his own failure and success. But a wise man learns from the failure and success of others."