Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

gim

Members
  • Content Count

    2
  • Joined

  • Last visited

Personal Information

  • First Name
    gim
  • Last Name
    gim
  • Country
    United States

Trading Information

  • Vendor
    No
  • Favorite Markets
    safeway

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Here is the code from the ELD posted by Zapisy _highestAtr type: function [LegacyColorValue = true]; { Returns the highest ATR value from a short ATR and a longer ATR. MAR 27 2004 : Holden Glova : Created } inputs: shortATRLength(numericSimple), longATRLength(numericSimple); vars: shortATRValue(0), longATRValue(0); shortATRValue = AvgTrueRange(shortATRLength); longATRValue = AvgTrueRange(longATRLength); if shortATRValue > longATRValue then begin _highestATR = shortATRValue; end else begin _highestATR = longATRValue; end; _AtrRatchetLX type: strategy [LegacyColorValue = true]; input: atrMultiplier (0.05); input: shortAtrLength (4); input: longAtrLength (20); input: numLowsBack (5); input: numAtrsToStartRatchet (4); input: ______________________ (0); input: www.linetrol.com (0); vars: stopPrice(0), atrValue(0), ratchetingBarCnt(0), hasStarted(false); if marketPosition = 1 then begin atrValue = _highestAtr(shortAtrLength, longAtrLength); if C > (entryPrice(0) + (atrValue * numAtrsToStartRatchet)) and hasStarted = false then begin hasStarted = true; stopPrice = entryPrice(0); end; if hasStarted then begin if ratchetingBarCnt > 0 then begin if stopPrice < Lowest(L, numLowsBack) then stopPrice = Lowest(L, numLowsBack); stopPrice = stopPrice + (atrValue * (atrMultiplier * ratchetingBarCnt)); end; sell("Ratchet_LX") next bar at stopPrice stop; end; ratchetingBarCnt = ratchetingBarCnt + 1; end; if marketPosition <> 1 then begin hasStarted = false; ratchetingBarCnt = 0; end; _AtrRatchetSX type:strategy [LegacyColorValue = true]; input: atrMultiplier (0.05); input: shortAtrLength (4); input: longAtrLength (20); input: numHighsBack (5); input: numAtrsToStartRatchet (4); input: ______________________ (0); input: www.linetrol.com (0); vars: stopPrice(0), atrValue(0), ratchetingBarCnt(0), hasStarted(false); if marketPosition = -1 then begin atrValue = _highestAtr(shortAtrLength, longAtrLength); if C < (entryPrice(0) - (atrValue * numAtrsToStartRatchet)) and hasStarted = false then begin hasStarted = true; stopPrice = entryPrice(0); end; if hasStarted then begin if ratchetingBarCnt > 0 then begin if stopPrice > Highest(H, numHighsBack) then stopPrice = Highest(H, numHighsBack); stopPrice = stopPrice - (atrValue * (atrMultiplier * ratchetingBarCnt)); end; buy to cover("Ratchet_SX") next bar at stopPrice stop; end; ratchetingBarCnt = ratchetingBarCnt + 1; end; if marketPosition <> -1 then begin hasStarted = false; ratchetingBarCnt = 0; end;
  2. please paste a snapshot inline here. the link you provided is broken. thanks.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.