For Easylanguage experts....

Almarok

Active member
Messages
106
Likes
18
Hello,
good day everyone. I found this Trading System in my archive, and I would like to test it, but Tradestation 2000i reports errors (see image).
The formula of the T.S. it's the following:

-------------------------------------------------

Input: Per(30), Length(1), Per2(8), Per3(21);
Vars: Acceleraz1(false), Acceleraz2(false), ave(0);

Ave = XAverage(MACD(C, 10, 25), 10);

If adx(Per) <> 0 and adx(Per)[Length] <> 0 Then begin
value1 = (absvalue(ADX(Per) - ADX(Per)[Length])/ADX(Per)[Length])*100;

if Average(C, per2)[Length] <> 0 and Average(C, Per2) <> 0 then
value2 = (absvalue(Average(C, Per2)-Average(C, per2)[Length])/ Average(C, per2)[Length])*100;

if Average(C, per3)[Length] <> 0 and Average(C, Per3) <> 0 then
value3 = (absvalue(Average(C, Per3)-Average(C, per3)[Length])/ Average(C, per3)[Length])*100;

if value1 > value1[1]*3 Then Begin
if value2 > value3 and MACD(C, 10, 25) < Ave then Buy next bar {Highest(H, 5) Limit}O;
if value2 < value3 and MACD(C, 10, 25) > Ave Then Sell next bar {Lowest(L, 5) Limit}O;
end;

end
else value1 = 0;

if Marketposition = 1 and MACD(C, 10, 25) > Ave Then ExitLong ("LX") next bar at market;
if Marketposition = -1 and MACD(C, 10, 25) < Ave Then Exitshort ("SX") next bar at market;

-----------------------------------------------------




If someone who is familiar with Easylanguage can correct the formula, thank you in advance.
 
Hi. I can't personally correct the formula but I know a man who can! I use to have TS and used EL quite alot for coding strategies and testing etc. I don't have TS anymore and I was intermediate at coding
If you want the contact just PM me and I will give you his name. I might have his email address still so will be able to give this to you
He really is the very best for coding in TS and also writes regularly for TS themselves so do let me know.

Regards
Vimal
 
Hi Vimal1,
I can't send you a PM, if you want to write me here:
[email protected]

I propose an interesting exchange: if your friend helps me for another formula, I can reciprocate with 3 T.S. professional and famous.
The formula of the T.S. above, has already been corrected on this Site:

 
Last edited:
Good morning,

the correct formula of the T.S. for Tradestation 8 or higher is this:

Input: Per(30), Length(1), Per2(9), Per3(20);
Vars: Acceleraz1(false), Acceleraz2(false), ave(0);

Ave = XAverage(MACD(C, 10, 25), 10);

If adx(Per) <> 0 and adx(Per)[Length] <> 0 Then begin
value1 = (absvalue(ADX(Per) - ADX(Per)[Length])/ADX(Per)[Length])*100;

if Average(C, Per2)[Length] <> 0 and Average(C, Per2) <> 0 then
value2 = (absvalue(Average(C, Per2)-Average(C, Per2)[Length])/ Average(C, Per2)[Length])*100;

if Average(C, Per3)[Length] <> 0 and Average(C, Per3) <> 0 then
value3 = (absvalue(Average(C, Per3)-Average(C, Per3)[Length])/ Average(C, Per3)[Length])*100;

if value1 > value1[1]*3 Then Begin
if value2 > value3 and MACD(C, 10, 25) < Ave then Buy next bar {Highest(H, 5) Limit}O;
if value2 < value3 and MACD(C, 10, 25) > Ave Then Sellshort next bar {Lowest(L, 5) Limit}O;
end;

end
else value1 = 0;

if Marketposition = 1 and MACD(C, 10, 25) > Ave Then Sell ("LX") next bar at market;
if Marketposition = -1 and MACD(C, 10, 25) < Ave Then Buytocover ("SX") next bar at market;
 
P.S.: Wall Street collapses....

"I'll tell you how to get rich.
Close the door.
Be afraid when others are greedy, be greedy when others are afraid."

(Warren Buffett)

free https image hosting
 
Last edited:
Top