PureBytes Links
Trading Reference Links
|
>Subject: Use TS 4.0 for manual trade tracking?
> Date: Sat, 10 Apr 1999 02:03:13 +0100
> From: "Ian Frost" <ian.frost@xxxxxxxxxxxxxx>
> To: <omega-list@xxxxxxxxxx>
>
>Hi,
>I use TS 4.0 for its indicators for the plotting of indicators
>and painbars, not systems so I have no idea where to start on this.
>I was wondering therefore if someone would be able tell say if the
>following is possible and how I might start the project.
>I would like to be able to track and plot within TS4.0 trades
>that I execute. One could say manually, i.e. not related to a system.
>For example if Mon 5th April went long USM9 1 unit, ( I know the
>dates and prices of all my trades, or if they were done just mkt on
>open), and closed it out today again mkt on open, to be able to plot
>that using the system tracking on TS both graphically and in PL terms.
>I need to be able to show my boss in nice simple terms where they went
>long or short and how much they made from their intuitive trading
>versus a more mechanical and disciplined approach.
>
>I guess this must be possible, just not sure where to start. Any
>clues???
>
>Thanks in advance
>Ian>
>
>_| _| _| _| _| _| _| _| _| _| _|_| _| _|
>_| ian.frost@xxxxxxxxxxxxxx
>_| Tel (H) 44-181-675-9660
>_| Tel (W) 44-181-972-6818
>>_| _| _| _| _| _| _| _| _| _| _|_| _| _|
////////////////////////////////////////////////////////
I have written two such systems that allow manual setting of entries and
stops.
You must enter the price, the date and time of the trade, your MaxLoss
or
Trailing Stop. But since TS buys on the close of the bar, it is
sometimes
difficult to get the buy at exactly the price you entered. Sometimes
you have
to change the bar compression or pick an earlier or later time which
will give
you the closest price.
I have enclosed two systems: one for a single buy, and one for four
concurrent buys.
You may wish to change the stop mechanism, or anything else.
{SYSTEM: Force Buy w/Exit}
input : BuyPrice(0), BuyDate(990), BuyTime(0), MaxLoss(2),TrailStp(3) ;
Variables : Gain(0), TradeHi(0), TradeGain(0), Once(0) ;
IF Close > TradeHi Then TradeHi = Close ;
TradeGain = TradeHi - EntryPrice ;
IF BuyPrice >= Low AND BuyPrice <= High
AND Date = BuyDate AND Once = 0
AND ( Time >= BuyTime OR BuyTime = 0 )
Then BEGIN
BUY This Bar ; TradeHi = Close ; Once = 1;
End ;
IF MarketPosition = 1 AND Close <= EntryPrice - MaxLoss
Then EXITLONG ("Loss") This Bar ;
IF MarketPosition = 1 AND TradeGain >= 1
AND Close < TradeHi - TrailStp
Then EXITLONG ("TrailStop") This Bar ;
==============================================
{SYSTEM: Force Buy x4 w.Stop}
input : MaxLoss(2),TrailStp(3),Stop_$(0),
Buy1Pric(0), Buy1Date(990), Buy1Time(0),
Buy2Pric(0), Buy2Date(990), Buy2Time(0),
Buy3Pric(0), Buy3Date(990), Buy3Time(0),
Buy4Pric(0), Buy4Date(990), Buy4Time(0) ;
Variables : Gain(0), TradeHi(0), TradeGain(0), Once(0) ;
IF Close > TradeHi Then TradeHi = Close ;
TradeGain = TradeHi - EntryPrice ;
IF Buy1Pric >= Low AND Buy1Pric <= High
AND Date = Buy1Date AND CurrentEntries = 0
AND ( Time >= Buy1Time OR Buy1Time = 0 )
Then BEGIN
BUY ("Buy1") This Bar ; TradeHi = Close ; Once = 1;
End ;
IF Buy2Pric >= Low AND Buy2Pric <= High
AND Date = Buy2Date AND CurrentEntries = 1
AND ( Time >= Buy2Time OR Buy2Time = 0 )
Then BEGIN
BUY ("Buy2") This Bar ; TradeHi = Close ; Once = 1;
End ;
IF Buy3Pric >= Low AND Buy3Pric <= High
AND Date = Buy3Date AND CurrentEntries = 2
AND ( Time >= Buy3Time OR Buy3Time = 0 )
Then BEGIN
BUY ("Buy3") This Bar ; TradeHi = Close ; Once = 1;
End ;
IF Buy4Pric >= Low AND Buy4Pric <= High
AND Date = Buy4Date AND CurrentEntries = 3
AND ( Time >= Buy4Time OR Buy4Time = 0 )
Then BEGIN
BUY ("Buy4") This Bar ; TradeHi = Close ; Once = 1;
End ;
IF MarketPosition = 1
AND ( Close <= EntryPrice - MaxLoss OR ( Stop_$ > 0 AND C < Stop_$
) )
Then EXITLONG ("Loss") This Bar ;
IF MarketPosition = 1 AND TradeGain >= 1
AND ( Close < TradeHi - TrailStp OR (Stop_$ > 0 AND C <
Stop_$) )
Then EXITLONG ("TrailStop") This Bar ;
===================================================
|