Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Experienced programmer, new to TradeStation/EasyLanguage has questions:
I just entered the code for four of the trading systems in the Pruitt text. Here are my results:
King Keltner, page 129: Code compiles when added to charts, I get no response or visible output.
Bollinger Bandit, page 133: Works and I love it!! This is the a really great example of the kind of systems I'd like to write.
Thermostat Program, page 138: My compile error is:
cmiVal = ChoppyMarketIndex(30);
Unknown Identifier
I think I know what's going on, but not how to fix it. I am guessing that the capital C in Choppy tells me that this an internal function inside EL, and that all I have to do is call it. My reasoning is that all user defined functions in the text start with a lower case letter and since this function appears nowhere else in the code, it must be inside the EL code library and I just don't know how to call it properly.
Dynamic Breakout II, page 143: Same as Kink Keltner above. Compiles but no visible output.
I'll continue looking for systems source code so I can speed up my learning curve for EasyLanguage.
My goal for my first two systems programs are:
1. Scan for all stocks that have been in a tight trading range for ten days or more.
2. Write a strategy that draws two boundaries above and below the trading range (using points or percents) and that alerts for a Buy or Sell when either boundary is crossed.
My questions:
1. Any solutions or hints to the problems above?
2. Can you provide any sources for systems programs that I can code, run and learn from?
Since the Bollinger Bandit worked, here is the EasyLanguage source code for those that don't have the text:
Can you help answer these questions from other members on NexusFi?
A few years ago, a friend of mine told me that to get the signals of the Trading System: Dynamic Breakout II, in the window: Format Analysis Techniques & Strategies (Properties for All label), you have to write: 1500 in the voice:
Maximum number of bars study will reference and then OK.
For the Trading System Thermostat, I found in my archive, the function: ChoppyIndex, which could be similar to the function: ChoppyMarketIndex;
you can try it, of course you'll have to give it the name: ChoppyMarketIndex(30)
This is the Function: ChoppyIndex:
If HighestBar(TrueHigh,30) <= LowestBar(TrueLow,30)
then ChoppyIndex = 10*(Highest(TrueHigh,30)-Lowest(TrueLow,30))
else ChoppyIndex = - 10*(Highest(TrueHigh,30)-Lowest(TrueLow,30));
The following user says Thank You to Shaban for this post:
Choppy Market Index is a function that you create in chapter 4. Make sure the name you give it when creating in chapter 4 is what you update the code to. In mine below you will see I named in $PruittChoppyMarketIndex. Same as Shaban's before, but this is pasted directly from the book.
The following 2 users say Thank You to bacou for this post:
I've tried the T.S. King Keltner and it doesn't give any signal, even setting: Maximum number of bars study will reference: at 1500 and also at 2000;
if anyone has any suggestions for solving this little problem....
Shaban thanks for your note on the Dynamic Breakout, I just had to update my number of bars to reference.
For the King Keltner there was an error in the book. I think he posted the correction on his website if you google it. For the movAvgVal calculation it needs to be divded by 3 as below-
Thank you bacou for correcting King Keltner's formula, in my haste I hadn't noticed.
P.S. What is the Input: numATRs(1.0) for?
Probably for T.S.: Dynamic Breakout II, maybe it depends on the version of Tradestation, e.g. for Tradestation 2000i you might need to set: Maximum number of bars study... to 1500, while I tried Tradestation 8.2, 100 is enough.