| Coding Forum Collaborate, receive help, or discuss coding related issues. |
![]() | | Tweet | |
| | #65 | ||
![]() | Re: Think or Swim Code/indicators | ||
| |
|
| | #66 | ||
![]() | Re: Think or Swim Code/indicators | ||
| |
|
| | #67 | ||
![]() | Re: Think or Swim Code/indicators scalps for 15 min chart ---------------------------------------- declare lower; declare zerobase; input length = 50; input size = 2.5; plot body = if ((absvalue(close-open)) >= size) then absvalue(close-open) else 0; #absvalue (close-open) ; plot bodyAvg = Average((absvalue(close-open)), length); plot after = if ((absvalue(close[1]-open[1])) >= size) and ( (absvalue(close[1]-open[1])) / (absvalue(close-open)) ) >=2 then ( (absvalue(close-open)) ) else 0; after.SetPaintingStrategy (PaintingStrategy.HISTOGR AM); after.SetDefaultColor(Get Color(2)); plot dwnreverse = if (close[1] < open[1]) and ((absvalue(close[1]-open[1])) >= size) and ( close > ( ((absvalue (close[1]-open[1]))/2)+ close[1])) then (absvalue(close-open)) else 0; dwnreverse.SetPaintingStr ategy(PaintingStrategy.HI STOGRAM); dwnreverse.SetDefaultColo r(GetColor(6)); plot upreverse = if (close[1] > open[1]) and ((absvalue(close[1]-open[1])) >= 2) and ( close < ( (close[1]) - ((absvalue (close[1]-open[1]))/2) )) then (absvalue(close-open)) else 0; upreverse.SetPaintingStra tegy(PaintingStrategy.HIS TOGRAM); upreverse.SetDefaultColor (GetColor(5)); body.SetPaintingStrategy( PaintingStrategy.HISTOGRA M); body.DefineColor("Up", Color.yellow); body.DefineColor("Down", Color.blue); body.AssignValueColor(if close > close[1] then body.color("Up") else if close < close[1] then body.color("Down") else GetColor(1)); bodyAvg.SetDefaultColor(G etColor(8)); | ||
| |
|
| | #68 | ||
![]() | Re: Think or Swim Code/indicators ------------------------------------ input signalOffsetFactor = 0.20; def signalOffset = AvgTrueRange(high,close,l ow,9)*signalOffsetFactor; input price = close; def triggerSell = (close[1] > open[1]) and ((absvalue(close[1]-open[1])) >= 1) and ( close < ( (close[1]) - ((absvalue (close[1]-open[1]))/2) )) ; #-------------------------------- def triggerBuy = (close[1] < open[1]) and ((absvalue(close[1]-open[1])) >= 1) and ( close > ( ((absvalue (close[1]-open[1]))/2)+ close[1])) ; #----------------------------------------- #plot SBS = if (triggerSell , high+signaloffset, if (triggerBuy, low-signaloffset, double.nan) ); plot uSBS = if (triggerSell, high+signaloffset, double.nan); plot dBS = ( if (triggerBuy, low-signaloffset, double.nan) ); uSBS.SetStyle(curve.POINT S); uSBS.SetPaintingStrategy( paintingStrategy.LINE_VS_ SQUARES); uSBS.SetLineWeight(2); uSBS.SetDefaultColor(colo r.blue); dBS.SetStyle(curve.POINTS ); dBS.SetPaintingStrategy(p aintingStrategy.LINE_VS_S QUARES); dBS.SetLineWeight(2); dBS.SetDefaultColor(color .blue); | ||
| |
|
| | #69 | ||
![]() | Re: Think or Swim Code/indicators ------------------------------- declare lower; input ATRLength = 14; #plot ATR = AbsValue(close - open); plot ATR = if ((close-open)<0) then ((volume)/ABSVALUE(close-open)) else 0; ATR.SetDefaultColor(GetCo lor(8)); ATR.SetPaintingStrategy(P aintingStrategy.HISTOGRAM ); ATR.DefineColor("Positive ", Color.green); ATR.DefineColor("Negative ", Color.red); ATR.AssignValueColor(if (close - open) > 0 then ATR.color("Positive") else ATR.color("Negative")); | ||
| |
|
| | #70 | ||
![]() | Re: Think or Swim Code/indicators ---------------------- declare lower; input ATRLength = 14; #plot ATR = AbsValue(close - open); plot ATR = if ((close-open)>0) then ((volume)/(close-open)) else 0; ATR.SetDefaultColor(GetCo lor(8)); ATR.SetPaintingStrategy(P aintingStrategy.HISTOGRAM ); ATR.DefineColor("Positive ", Color.green); ATR.DefineColor("Negative ", Color.red); ATR.AssignValueColor(if (close - open) > 0 then ATR.color("Positive") else ATR.color("Negative")); | ||
| |
|
| | #71 | ||
![]() | Re: Think or Swim Code/indicators -------------------------------------- declare lower; input ATRLength = 14; def HA = high[1]; def HB = high[2]; def HC = high[3]; def LA = low[1]; def LB = low[2]; def LC = low[3]; def C = close[1]; def H3 = Max(Max(HA, HB), HC); def L3 = Min(Min(LA, LB), LC); Def calc_PP = (H3 + L3 + C) / 3; def calc_MP = (H3 + L3) / 2; def calc_PR = AbsValue(calc_PP - calc_mp); def calc_PH = Calc_PP + calc_PR; def calc_PL = Calc_PP - calc_PR; plot ATR = - ( (absvalue(calc_PH-calc_PL))- (absvalue(calc_PH[1]-calc_PL[1])) ); #plot ATR =1/(AbsValue(calc_PH - calc_PL)) ; #def hum = (AbsValue(calc_PH - calc_PL)) ; ATR.SetDefaultColor(GetCo lor(8)); ATR.SetPaintingStrategy(P aintingStrategy.HISTOGRAM ); ATR.DefineColor("Positive ", Color.gray); ATR.DefineColor("Negative ", Color.green); ATR.AssignValueColor(if #HUM ATR < 0 then ATR.color("Positive") else ATR.color("Negative")); | ||
| |
|
| | #72 | ||
![]() | Re: Think or Swim Code/indicators -------------------------------- declare lower; input ATRLength = 14; #plot ATR = AbsValue(close - open); #plot ATR = ((volume)/(absvalue(close-open))); plot ATR = volume / ((absvalue(close-open))/(absvalue(high-low))); ATR.SetDefaultColor(GetCo lor(8)); ATR.SetPaintingStrategy(P aintingStrategy.HISTOGRAM ); ATR.DefineColor("Positive ", Color.green); ATR.DefineColor("Negative ", Color.red); ATR.AssignValueColor(if (close - open) > 0 then ATR.color("Positive") else ATR.color("Negative")); | ||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| TTM Indicators for CQG? | bathrobe | Coding Forum | 3 | 01-03-2011 06:01 AM |
| TradeStation Strategy Code Help | jjthetrader | Coding Forum | 2 | 10-26-2010 08:06 AM |
| TTM trend esignal code | philloo | Trading Indicators | 9 | 04-16-2009 09:51 AM |
| Does Anyone have the TTM Scalper Code for Esignal??? | jphillips9 | Beginners Forum | 5 | 01-14-2008 07:26 PM |
| Floor Trader Pivot Code Help.... | jmi88 | Coding Forum | 1 | 05-22-2007 10:13 PM |