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.

clbradley

Members
  • Content Count

    48
  • Joined

  • Last visited

Everything posted by clbradley

  1. I am trying to verify, and if there were no errors (this box says Grammar error), then it says verification successful and no problem. This grammar error it blacks out the word "true" (and I tried replacing it with "TrueFalse" and get the same Grammor error message) and within the Grammar error box it says "Arithmetic (numeric) expression expected here. Underneath that you click a little box that says OK, and it just leaves you to figure out what to put instead of the blacked over true or TrueFalse, because they don't work. Have the 2nd to most recent platform, see one just came out within the last week, have Tradestation 8.4 (Build 1693). Try it if you're not sure, but it won't verify for me with true or TrueFalse there near the end after "then Triangle =". It seems to want a # I'm guessing by the "Arithmetic (numeric) expression expected here" message. Thanks for any help. Curtis
  2. I made the function Triangle as you noted, yet keep getting an error message that says "Arithmetic (numeric) expression expected here". It is alluding to the word "true" in the 2nd to last sentence, "then Triangle = true" It will probably say the same thing for false once I fix true. What Arithmetic (numeric) expression should I use instead of true or false near the end of the function code? Thanks. Curtis
  3. Hey. Have tried this older Triangle Pattern Code I found on the net for Tradestation, but apparently the code has changed, and it doesn't recognize the word triangle. Can anyone help? Thanks. Here's the code, indicator's at the bottom, function at the top: Triangle Pattern Indicator by Walt Downs Origin: omega-list Written by: Walt Downs Date found: 1 dec 97 Indicator calculates triangles based on SwingHighs and lows of a 10 day range, and with a swing strength of "1". Larger triangles can be calculated by increasing the strength and/or HighestBar/LowestBar range settings. The indicator plots a simple "spike" graph, alerting the trader to the presence of a triangle. The trader can then apply logical trendlines to establish break-out points. Type : Function, Name : Triangle Pattern Indicator input: OccurH1(numericsimple),OccurH2(numericsimple),OccurL1(numericsimple), OccurL2(numericsimple),PriceH1(numericseries),PriceH2(numericseries), PriceL1(numericseries),PriceL2(numericseries),StrenH(numericsimple), StrenL(numericsimple),Len(numericsimple); value1 = SwingHighBar(OccurH1,PriceH1,StrenH,Len); value2 = SwingHighBar(OccurH2,PriceH2,StrenH,Len); value3 = SwingLowBar(OccurL1,PriceL1,StrenL,Len); value4 = SwingLowBar(OccurL2,PriceL2,StrenL,Len); Condition1 = high of value2 bars ago > high of value1 bars ago; Condition2 = low of value4 bars ago < low of value3 bars ago; Condition3 = HighestBar(H,Len) = value2; Condition4 = LowestBar(low,Len) = value4; if Condition1 and Condition2 and Condition3 and Condition4 then Triangle = true else Triangle = false; Type : Indicator, Name : Triangle Pattern Indicator input: OccurH1(1), OccurH2(2), OccurL1(1), OccurL2(2), PriceH1(high), PriceH2(high), PriceL1(low), PriceL2(low), StrenH(1), StrenL(1), Len(10); if Triangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1, PriceH2,PriceL1,PriceL2,StrenH,StrenL,Len) = true then plot1(10,"TriFinder") else plot1(0,"TriFinder"); if Triangle(OccurH1,OccurH2,OccurL1,OccurL2,PriceH1,PriceH2, PriceL1,PriceL2,StrenH,StrenL,Len) = true then Alert = true;
  4. On the chart of the W %R, but want to code it within the W %R code, so think it needs to be extra plots in the code. Thanks for asking, can you help with that? Curtis
  5. I know Larry Williams used W %R with moving averages to win Futures Championships. However, I'm not sure how to use the basic W %R code and add two Hull moving averages, one fast, one slow, in the code. You can overlay in Tradestation 1 or many moving averages on an indicator by scaling it on the same sub-graph as the indicator, and changing scale of the MAs to no axis. I don't think it's has the same effect as plotting the HMAs into the code, rather than scaling them on no axis. Thanks for any help. Curtis
  6. Finally got another day off and once again you have fantastic advice and help. I need to put these strategies into TS now and backtest them. Thanks again for all you have done with this. Curtis
  7. Thanks again so much Blu-Ray, they've been working me to death this week, and haven't had any time off. I don't know why I thought that you had to specify if it was on a 15, 30, 60 minute, or daily basis in the code. If I wanted to have the trade for just during the session 9:30-4 Eastern Standard Time and end at the end of day each day instead of holding overnight, what would be required? I have a couple others that look good, one with a simple moving average crossover, and the other with an exponential crossover, so should I just replace FastAvg = jTHMA(Close,FastLength); SlowAvg = jTHMA(Close,SlowLength); with SMA or EMA, instead of jtHMA? Thanks again for all your help. Curtis
  8. Thanks again, Blu-Ray. Do I need to put in anything to state if I want this to repeat buy/sellshort order on a daily timeframe or 60 minute timeframe? No need to use (end;) at the end? Thanks for any more info, especially on the time issue. Curtis
  9. Thanks so much...headed to work, but I'll try and test it when I get home tonight. Curtis
  10. If I wanted to use the Hull Moving Average (jtHMA) for a crossover strategy instead of a simple or exponential moving average crossover strategy, how would it be coded in Easy Langurage for a fast length jtHMA(10) and a slow length jtHMA (20) with parameters that if fast avg jtHMA crosses above slow avg jtHMA then BuyLong 100 shares next bar at market, and SellShort if reverse, and would like to be able to displace the jtHMAs + or -1, 2, or 3, and will be using this on a 30 or 60 min. timeframe? Also, is it possible, or even necessary, to put within the strategy a buy/sellshort order with a pre-set stoploss? Possibly something like: If conditions are met for fast jtHMAavg crosses slow jtHMAavg, then begin; buy/sellshort 100 shares next bar at market; SetProfitTarget(1000); SetStopLoss( 100); end; This is going to be my first time using a strategy, and want to backtest it, haven't tried that and not sure how to figure it in for possible flaws and slippage for backtesting in Tradestation. I'm going to use it on a 2x or 3x Proshares or Direxion index fund, and the position will reverse immediately when the jtHMAs cross on the next bar after the cross, from long to sellshort, or vice-versa. Not sure if that brings more problems, the instant reversal. Thanks for any help. Curtis
  11. If I wanted to use the Hull Moving Average (jtHMA) for a crossover strategy instead of a simple or exponential moving average crossover strategy, how would it be coded in Easy Language for a fast length jtHMA(10) and a slow length jtHMA (20) with parameters that if fast avg jtHMA crosses above slow avg jtHMA then BuyLong 100 shares next bar at market, and SellShort if reverse, and would like to be able to displace the jtHMAs + or -1, 2, or 3, and will be using this on a 30 or 60 min. timeframe? Also, is it possible, or even necessary, to put within the strategy a buy/sellshort order with a pre-set stoploss? Possibly something like: If conditions are met for fast jtHMAavg crosses slow jtHMAavg, then begin; buy/sellshort 100 shares next bar at market; SetProfitTarget(1000); SetStopLoss( 100); end; This is going to be my first time using a strategy for Tradestation, and want to backtest it, haven't tried that and not sure how to figure it in for possible flaws and slippage for backtesting. I'm going to use it on a 2x or 3x Proshares or Direxion index fund, and the position will reverse immediately when the jtHMAs cross on the next bar after the cross, from long to sellshort, or vice-versa. Not sure if that brings more problems, the instant reversal. Thanks for any help. Curtis
  12. Are there any comparable automatic Fib retracement codes for Tradestation? Thanks. Curtis
  13. If I wanted to use the Hull Moving Average (jtHMA) for the crossover strategy instead of a simple or exponential moving average crossover strategy, what would I need to put in say for a fast length jtHMA(10) and a slow length jtHMA (20) with similar parameters as above, if fast avg jtHMA crosses above slow avg jtHMA then buy next bar after lines cross at open of bar, and SellShort if reverse, and want to be able to use the displace feature if possible to displace the jtHMAs +1, 2, or 3, going to test to see what works better. Also, is there a way to buy intrabar after crossing, and what other coding would need to be put in to use this on a 30 or 60 min. timeframe? Thanks for any help. Curtis
  14. If I wanted to use the Hull Moving Average (jtHMA) for the crossover strategy instead of a simple or exponential moving average crossover strategy, what would I need to put in say for a fast length jtHMA(10) and a slow length jtHMA (20) with similar parameters as above, if fast avg jtHMA crosses above slow avg jtHMA then buy next bar after lines cross at open of bar, and SellShort if reverse, and want to be able to use the displace feature if possible to displace the jtHMAs +1, 2, or 3, going to test to see what works better. Also, is there a way to buy intrabar after crossing, and what other coding would need to be put in to use this on a 30 or 60 min. timeframe? Thanks for any help. Curtis
  15. I'll try that, thanks but think it's a lot more to it....thanks again.
  16. Here's the MA Crossover for Radarscreen code for Tradestation. Works great at showing when and how many bars ago a stock has crossed over, I'd use it on an intraday timeframe interval when one has just recently crossed to try and enter a trade. Am looking for a similar code for DMI cross with ADX in the code to see how strong or weak the trend is. MA Crossover code, giving credit to author at top: { Indicator: _CrossOverMA Purpose: on chart: shows fast and slow moving averages on radarscreen: shows price, fast and slow moving averages, and number of bars since MA crossover has occurred Note in RS: sort BarsLong in descending order to see all stocks that just recently had Long Trigger sort BarsShort in descending order to see all stocks that just recently had Short Trigger Author: MarkSanDiego Version: 06/22/08 initial } input: Price(close), FastLength(12), SlowLength(26), FastPhase(0), SlowPhase(0), UpColor(green), DnColor(red); var: FastMA(0), SlowMA(0), RS(False), Dir(0), // trade direction BarsLong(100), // bars since Long trigger BarsShort(100); // bars since Short trigger once RS = GetAppInfo(aiApplicationType) = 2; // check if Radarscreen FastMA = AverageFC(Price, FastLength); // test with simple moving average so others can try SlowMA = AverageFC(Price, SlowLength); If Dir = 1 then BarsLong = BarsLong + 1; if Dir = -1 then BarsShort = BarsShort + 1; if RS then Plot1(Price,"Price"); Plot2(FastMA,"Fast MA"); Plot3(SlowMA, "Slow MA"); if FastMA crosses over SlowMA then begin BarsLong = 0; Dir = 1; if RS then begin // radarscreen SetPlotColor(1, black); SetPlotBGColor(1, UpColor); end else begin SetPlotColor(1, UpColor); // chart end; end; If FastMA crosses under SlowMA then begin BarsShort = 0; Dir = -1; if RS then begin // radarscreen SetPlotColor(1, black); SetPlotBGColor(1, DnColor); end else begin // chart SetPlotColor(1, DnColor); end; end; if RS then begin if Dir = 1 then begin Plot4(BarsLong,"Bars Long", black); SetPlotBGColor(4, UpColor); end; if Dir = -1 then begin Plot5(BarsShort,"Bars Short", black); SetPlotBGColor(5, DnColor); end; end; Thanks for any help to convert it to a DMI crossover code, with ADX number shown in Radarscreen as well. Have been looking for this all week. Thanks again. Curtis
  17. Hey. I'm trying to find a code for a positive and negative DMI cross that will show on charts and in Radarscreen and show how many bars ago they crossed long or short like with this code in the thread for CrossoverMA: https://www.tradestation.com/Discussions/Topic.aspx?Topic_ID=78248 Hopefully this thread and open code there for MA and EMA crossovers and how many bars ago they crossed and whether it's long or short, all showing on charts and in Radarscreen, will help others as well. Please post the pos./neg. DMI Crossover code where you can see the crossovers on a chart and also screen in Radarscree for ADX in the same area of Radarscreen to see if the trend is strong or weak for stocks or ETFs, and open code so one can change the input numbers for DMIs and ADX numbers (my #s are sped up and not usual 14,25), and show long or short x number of bars ago if they crossed like with the MA/EMA crossover in the thread above. Thanks. Curtis
  18. Would anyone know what the Dynamic VWAP with StdDevs for SC code for Tradestation 8.4 would be? Thank you very much for any help. Curtis
  19. Is there a way to convert this into a code for Tradestation? Thanks. Curtis
  20. Thanks for posting that wsam29. That code does work, but I tried to change it to +3 & -3 standard deviation and just changed the #s on lines 8 and 9 that say NumDevsUp and NumDevsDn. Is that right or do I need to change other numbers in the code? Also the channel only works at the very right side of the charts, is there a way to get it to go all the way across the chart, mainly use it on monthly and weekly charts. Thanks for any help. Curtis
  21. I would like a code for a chart overlay of standard deviation channels built on a base of a linear regression trend like Bollinger bands, with 2 standard deviations above and below the LR line. When it is attempted on TS, it's hard to use, unlike eSig and a few other platforms I've used before, which make it easy with jumpboxes where you can change the SD to 1, 2, 3, 5, 1.5,etc., and eSig has standard error. On TS, I can plot an objective LR line on daily, weekly, and monthly charts, the longer time frame seems more reliable, and when I try to use the regression channels with it, no matter how very skinny or extremely wide I make the channels, it always says 2 SD (Open), and I know that's not right. Metastock, Amibroker, Investor R/T, Esig has the best one, but they all have easy ways to plot the LR/SD +-2, 1, 3 overlays on charts, or whatever you want, but TS doesn't. Can you make a formula for a concrete overlay LR/SD channel of +-2 above and below a LR line so I can use it for D, W, and most important to me monthly charts, and show me where to change to couple-5 #s in the equation so I can make several screens of a few different numbers, sure there is no way to make a jumpbox like in other platforms. This is what I hope it will look like: http://www.onlinetradingconcepts.com/TechnicalAnalysis/LinRegChannel.html Except with the SD of 2 instead of 1.....Thanks in advance and I'll check back in another day or so, have to work nights again tomorrow, and am glued to the marker during the weekdays. Curtis
  22. Thanks for replying, sorry it took a little while to get back to you, I work nights and trade during the day. Guess what I'm looking for is a standard deviation channel like on this page: http://ta.mql4.com/linestudies/standard_deviation_channel, based on a linear regression line, not an indicator or oscillator, but an overlay like Bollinger Bands or moving averages. The one at TS is hard to use and when I stretch regression channels around a linear regression line, no matter how skinny or wide I make the channel, it always says 2 SD (Open). Investor/RT has another page which demonstrates what I'm looking for here: http://www.linnsoft.com/tour/techind/linReg.htm, and I can put them in individually in TS if that's what it takes one by one, that's how I had to change parameters on slow shotastics and RSI to 5, 7, and 21, had to copy the original page and just change the numbers for different RSI screens. Inv.R/T also has a follow-up page which shows linear regression forecast/bands similar to Bollinger bands for the E-mini; I don't do futures, just stocks & options, but this looks promising. The E-mini example of the linear reg. forecast/bands is at http://www.linnsoft.com/tour/techind/linRegForecast.htm, which shows this example: http://www.linnsoft.com/tour/techind/images/lrfKessler.jpg. There is an Amibroker page with good ideas for a formula:http://www.amibroker.com/library/detail.php?id=438&hilite=IIF, just need one for TS, and like I mentioned, I could change the individual #s and set up different Easy Language Documentsto be used like Bol. Bands if need be for each one like LR/SD 1, 1.5, 2.5, 3, 3.5, just would like a code for a linear regression with 2 standard deviations plotted off of it, just need a low number period to work with because I'll mostly be looking at it weekly and monthly more than that. Esig has a page with people discussing formulas for plotting it, but they have and easy way with jumpboxes to adjust LR and SD and standard error to whatever you want, and the moving linear regression is not necessary, just would like cleaner pre-plotted LR/SD that I can change to gauge more about stocks and the market. Thanks for your help in advance, have to go to work right after the market closes like Tue. again today. Curtis
  23. I would like a way to use the linear regression lines like they are in eSignal, with an open source code or jump box so you can adjust the standard deviation, but coded for Tradestation. It's been proven that a linear regression/standard deviation of plus and minus 2 usually contains about 90% of the range of a stock, and a LR/SD +-3 contains approx. 98% of the range, so I'd like the code please for Tradestation 8.3 for those linear regression channels, but where it's comparable to eSigs and objective and draws the lines over the whole chart monthly, weekly etc., not like Tradestations that is subjective to where you have to put it in like Fib channels and twist it to make it fit, and can start out (on TS charts) from a place that is incorrect. If someone has some TS codes for objective lines for a whole chart for LR/SD +-2 and +-3, that would be great, and I would really appreciate it, and if it could be open source so it could be changed for LR/SD lines for charts for whatever you want, +-1, 1.5, 2.5, etc, some stocks deviate more or less than others, and you can find the outer reaches to which a stock has always been contained in(tempted to get eSig just for that and cleaner charts/trendlines), and would help to see why a stock stops in it's tracks to the bottom or top, even when it seems like it has broken out, or down. Curtis
×
×
  • Create New...

Important Information

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