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)
Hello,
good day everyone. I found this Trading System in my archive, and I would like to test it, but Tradestation 2000i reports errors.
The formula of the T.S. it's the following:
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 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 sell ("LX") next bar at market;
if Marketposition = -1 and MACD(C, 10, 25) < Ave Then buytocover ("SX") next bar at market;
The following 3 users say Thank You to kevinkdog for this post: