This is how you round to the nearest tick in EasyLanguage – helpful when plotting
price based indicators. Also the formula for calculating the min tick value is given.
vars: minTick(0),testPrice(0);
minTick = minMove/priceScale;
testPrice = close * .21 * range;
// round up
value1 = testPrice + (minTick-mod(testPrice,minTick));
// round dn
value2 = testPrice - (mod(testPrice,minTick));
{mod is a call to the modulus function
aka remainder function -- mod(12,5) = 2 -- 12/5 = 2 Remainder 2
say ES testPrice = 1123.57
minTick = .25
1123.57 + (0.25 - mod(1123.57,0.25)) = 1123.57 + 0.25 - 0.07 = 1123.75}
A very astute reader of the BWTSwTS2 has brought to my attention errors in my description of the Thermostat and Bollinger Bandit algorithms. In the Thermo description I incorrectly used the words yesterday and today. The code is correct in the book. Thanks to John for finding this!
Corrected description follows:
….If today’s closing price is greater than the average of today’s high,low and close, then we feel tomorrow’s action will probably be bearish. However, if today’s closing price is less than or equal to the average of today’s high, low, and close, then tomorrow’s market will behave in a bullish manner.
In addition John uncovered a typo as well for the Bollinger Bandit description – when I stated BELOW I meant ABOVE and vice versa.
Corrected description follows:
If liqPoint is BELOW the upband, we will liquidate a long position if today’s market action <= liqPoint.
If liqPoint is ABOVE the dnband, we will liquidate a long position if today’s market action >= liqPoint.
Hi-Res Edition Just Added to Easing Into EasyLanguage Series
Hello to All! I just published the first book in this series. It is the Foundation Edition and is designed for the new user of EasyLanguage or for those you would like to have a refresher course. There are 13 tutorials ranging from creating Strategies to PaintBars. Learn how to create your own functions or apply stops and profit objectives. Ever wanted to know how to find an inside day that is also a Narrow Range 7 (NR7?) Now you can, and the best part is you get over 4 HOURS OF VIDEO INSTRUCTION – one for each tutorial. All source code is available too, and if you have TradeStation, so are the workspaces. Plus you can always email George for any questions. george.p.pruitt@gmail.com.
This book is for those that have read the Foundation Edition or have some experience working with EasyLanguage and the various functions that help make a trading decision. This book’s audience will be those programmers that want to take an idea, that requires an observation of intraday market movements to make a trading decision, and program it accurately. If you have programmed daily bar systems, and you want to drill down and add some components that require additional market information (like what came first – the high or the low), then you have come to the right place. If you want to buy and sell short in the same day and use trade management principles such as profit targets and stop losses then The Hi-Res Edition is the book you need. There are two paradigms that EasyLanguage covers: daily and intraday bar programming. It’s the same language, but the move from daily to intraday programming can be quite difficult. Learn all the essentials and shortcuts with this edition. 5 HOURS OF VIDEO INSTRUCTION in this Hi-Res edition – one for each tutorial. All source code is available too, and if you have TradeStation, so are the workspaces. Plus you can always email George for any questions. george.p.pruitt@gmail.com.
Pick you your copies today – e-Book or Paperback format!