Turin + Italy
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129
|
Hi,
I read in a book and also in an issue of Futures Truth magazine, that using 2 contracts instead of just one, the Equity Line can improve by becoming more regular;
therefore, I wanted to ask if someone can help me to insert in this Trading System 2 contracts, but the first contract will close in profit after 100 points (or + 0.45 % from the entry price),
while the second contract will follow the T.S. rules.
I thank you in advance.
------------------------------------------------------
Inputs: Length(50), len2(4), len3(4), Amount(1700);
vars:
daysintrade(0),atr(0),ptargmult(1),longliqpt(0), shortliqpt(9999999), protlongstop(0), protshortstop(0), lowestlow3(0),highesthigh3(0),bed
(0),sed(0),stb(0), sts(0);
atr=avgtruerange(Length);
lowestlow3=lowest(low,len2);
highesthigh3=highest(high,len3);
bed=0;
sed=0;
if (close>=close[1]) then sed=1;
if (close<=close[1]) then bed=1;
if(bed=1) then
begin
stb=open of tomorrow +.5*(highesthigh3-lowestlow3);
sts=open of tomorrow -(highesthigh3-lowestlow3);
end;
if(sed=1) then
begin
stb=open of tomorrow +(highesthigh3-lowestlow3);
sts=open of tomorrow -.5*(highesthigh3-lowestlow3);
end;
if (marketposition=1 and barssinceentry=0) then
protlongstop=entryprice(0)-3*atr[1];
if (marketposition=-1 and barssinceentry=0) then
protshortstop=entryprice(0)+3*atr[1];
if (marketposition<>marketposition(1)) then
begin
ptargmult=1;
longliqpt=0;
shortliqpt=999999;
end;
if (marketposition=1 and high[1]>entryprice(0)+ (3*atr[1])) then
begin
longliqpt=entryprice(0);
end;
if (marketposition=-1 and low[1]<entryprice(0)- (3*atr[1])) then
begin
shortliqpt=entryprice(0);
end;
buy tomorrow at stb stop;
sellshort tomorrow at sts stop;
SetStopLoss(Amount);
-------------------------------------------------------------
|