| TradeStation Custom Programming Discuss projects, ideas, obstacles in programming with TradeStation. |
![]() | | Tweet | |
| | #1 | ||
| Help with Moving Average Label I was wondering if there is a script or a way to display the number of the moving average graphically on the moving average line? Here is a screen shot of my tradestation daily chart mocked up with what I would like to do: http://screencast.com/t/nA9x96kP7 Any code out there that can help with this? Thank you in advance. Tem | |||
| |
|
| | #2 | ||
![]() | Re: Help with Moving Average Label Quote:
__________________ Only an idiot would reply to a stupid post | ||
| |
|
| | #3 | ||
![]() | Re: Help with Moving Average Label Quote:
Code: inputs: Price( Close ), Length( 9 ); variables: Avg( 0 ) ; Avg = AverageFC( Price, Length ) ; plot1(Avg, "MA"); Once Begin Value1=Text_new(D, T, H, "Start"); End; Text_SetString(Value1, " " + NumToStr(Length,0)); Text_SetLocation(Value1, D, T, Avg); Text_SetColor(Value1, Red);
__________________ Precise, "dialed-in", targeted combination setups, like opening a combination lock; is the experience you should be having while trading. Dial left, right, left, . . . click - the lock opens. | ||
| |
|
| | #4 | ||
| Re: Help with Moving Average Label I appreciate your assistance. Would you mind showing me how I can edit my existing standard code in tradestation included below with your suggestion? Again, I would greatly appreciate it. Unfortunately, not a programmer even at this basic level. My Code from tradestation standard 3 averages: inputs: Price( Close ), FastLength( 4 ), MedLength( 9 ), SlowLength( 18 ), Displace( 0 ) ; variables: FastAvg( 0 ), MedAvg( 0 ), SlowAvg( 0 ) ; FastAvg = AverageFC( Price, FastLength ) ; MedAvg = AverageFC( Price, MedLength ) ; SlowAvg = AverageFC( Price, SlowLength ) ; if Displace >= 0 or CurrentBar > AbsValue( Displace ) then begin Plot1[Displace]( FastAvg, "FastAvg" ) ; Plot2[Displace]( MedAvg, "MedAvg" ) ; Plot3[Displace]( SlowAvg, "SlowAvg" ) ; { Alert criteria } if Displace <= 0 then begin Condition1 = Price > FastAvg and FastAvg > MedAvg and MedAvg > SlowAvg ; if Condition1 and Condition1[1] = false then Alert( "Bullish alert" ) else begin Condition2 = Price < FastAvg and FastAvg < MedAvg and MedAvg < SlowAvg ; if Condition2 and Condition2[1] = false then Alert( "Bearish alert" ) ; end ; end ; end ; | |||
| |
|
![]() |
| Thread Tools | |
| Display Modes | Help Others By Rating This Thread |
| |
| ∧ Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help with Moving Average Label for Tradestation | tbalanco | Trading Indicators | 0 | 09-28-2011 04:48 PM |
| Moving Average with Extension | Tams | Trading Indicators | 2 | 02-27-2011 05:04 PM |
| Moving Average for Day Trading | rxs0005 | Technical Analysis | 5 | 07-18-2010 06:23 PM |
| Adaptive Moving Average (AMA) | metalhead | Technical Analysis | 38 | 07-03-2009 08:33 PM |
| Volume Moving Average | mister ed | Technical Analysis | 3 | 11-09-2008 06:43 AM |