NexusFi: Find Your Edge


Home Menu

 





Trading System with 2 contracts.....


Discussion in EasyLanguage Programming

Updated
    1. trending_up 5,527 views
    2. thumb_up 1 thanks given
    3. group 3 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

Trading System with 2 contracts.....

  #1 (permalink)
Shaban
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);

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

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
PowerLanguage & EasyLanguage. How to get the platfor …
EasyLanguage Programming
REcommedations for programming help
Sierra Chart
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
How to apply profiles
Traders Hideout
Better Renko Gaps
The Elite Circle
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
30 thanks
Spoo-nalysis ES e-mini futures S&P 500
28 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
20 thanks
GFIs1 1 DAX trade per day journal
16 thanks
  #2 (permalink)
 kjhosken 
Seattle, WA/USA
 
Experience: Intermediate
Platform: TOS, TS
Trading: Forex, crude
Posts: 96 since Sep 2016
Thanks Given: 7
Thanks Received: 35

Check out the webinar from Chris with ABC trading group. The relevant spot is at about minute 27.

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
Shaban
Turin + Italy
 
Posts: 194 since Feb 2020
Thanks Given: 24
Thanks Received: 129


[img]https://i.postimg.cc/qBNPhX8z/Buon-Natale-2020-in-inglese.jpg[/img]

Reply With Quote




Last Updated on December 24, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts