PureBytes Links
Trading Reference Links
|
Does anyone have a TS4 version of this code for an indicator and a system?
[Indicator]:
Inputs:
ATRLgth(10), { Length of average true range }
ATRSize(3); { Number of ATRs to use as the stop interval }
Vars:
ATRStop(0), MAXValue(0);
ATRStop = XAverage(TrueRange, ATRLgth);
If High - ATRStop > MAXValue then MAXValue = HIGH - ATRStop; { Raise stop
if needed }
If MAXValue >= Low Then Plot1(MAXValue, "Sell") {
Plot large dot with no line if stop hit }
Else Plot2(MAXValue, "SellStop");
{ Plot line at Stop Level }
============================================================================
===============================================
[System]:
{ Chuck Le Beau's Chandelier Exit }
Inputs:
ATRLgth(10), ATRSize(3),
ExitOpt(1); { 0 = X over exit, 1 = Chandelier Exit }
Vars:
ATRStop(0);
ATRStop = XAverage(TrueRange,ATRLgth);
If ExitOpt = 1 Then Begin
Sell Next Bar MaxTradeHigh - ATRSize * ATRStop;
Buy to Cover Next Bar MinTradeLow + ATRSize * ATRStop;
End;
Thomas J. Festa, CMT
Proprietary Trader
Benchmarq Trading, LLC
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.
|