[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with coding an initial stop loss



PureBytes Links

Trading Reference Links

"BarsSinceEntry = 1" - needs to be BarsSinceEntry >= 1

First one says if BarsSinceEntry = 1   which is true only once - on the
next bar.

Next one says if BarsSinceEntry = 1 OR if BarsSinceEntry > 1  which is
true on the next bar and then on all other bars.

Also, unless you are just back testing you will need to use Global
Variables in order to pass the BarLow and BarHigh values to the next day
unless you leave your computer on all the time.

You may also have a different problem with the "BarLow[1]".
BarLow/BarHigh are the current values of BarLow/BarHigh and should be
reset to a new value each time you enter a trade (long or short). 
Sometimes TS does strange things with the back one value [1].  You may
not get what you think you should get.

Larry


"Thomas J. Festa" wrote:
> 
> I am able to store the values for BarLow or BarHigh on the EntryBar but it
> seems that the system is not carrying the value forward to stop me out. The
> stop only seems to work on the initial bar to the next day but won't get me
> out if three or four days go by.  The system forgets I had an initial stop
> loss order and doesn't carry it forward to the next bar.  I want the stop to
> be like a Good Till Canceled order but the system cancels it after two or
> three bars.  So I must be missing something here:
> 
> ===========================================
> 
> THEN Buy ("Long Entry") This Bar on Close;
> 
> BarLow = LOW;
> BarHigh = HIGH;
> 
> IF MarketPosition = 1 and BarsSinceEntry = 1
>          THEN ExitLong ("SellStopLoss") BarLow[1] Stop;
> 
> =====================================================
> 
> - Sugestions?
> 
> Thanks,
> 
> Thomas J. Festa, CMT
> Technical Analysis Investment Consultant
> Proprietary Trader, Equities
> Benchmarq Trading, LLC  10003
> Cell:   (908) 581-8880
> 
> Confidentiality Notice: The information contained in this e-mail and any
> attachments may be legally privileged and confidential. If you are not an
> intended recipient, you are hereby notified that any dissemination,
> distribution, or copying of this e-mail is strictly prohibited. If you have
> received this e-mail in error, please notify the sender and permanently
> delete the e-mail and any attachments immediately. You should not retain,
> copy or use this e-mail or any attachment for any purpose, nor disclose all
> or any part of the contents to any other person.