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.
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.