Breakout_Range2 by Mark VakkurIn "Catching DJIA Breakouts" in this issue, I discuss the strategy of buyingmarkets that are breaking out to new highs, and present the results ofbuying breakouts in the Dow Jones Industrial Average (DJIA). In EasyLanguage, you can create a Boolean variable or a ShowMe studyto simply test whether the two conditions of a breakout are met. However, I thought it more useful to have the function return the numberof bars since the last time a new high was achieved. The only time a numberother than zero is returned is when it is a true breakout (the functionwill return a zero either when no new high is achieved or when a new highhas been achieved, but it has not been a breakout of look_bak length orgreater). The EasyLanguage code for this function, which I have called Breakout_Range2, follows: Type : Function, Name : Breakout_Range2 {********************1/26/2000 Mark Vakkur, M.D. if this bar is the highest bar of the last look_bak bars AND this has not occurred in look_bak bars, returns the number of bars, otherwise returns 0. **************} Inputs: price( numericseries), look_bak(numeric); Vars: bar_count(0), max_price(h); {number of bars since last high} If CurrentBar = 1 then Begin bar_count = 1; {bar_count counts the number of bars since a new high was made}End Else Begin If price > Highest(high, look_bak)[1] {if this bar is the highest high of the look_bak period} then Begin if bar_count >= look_bak then Begin Breakout_Range2=bar_count; bar_count = 0; End Else {highest high but NOT since look_bak bars} Begin bar_count = 0; Breakout_Range2 = 0; End; End { of highestbar check } Else {this isn't the highest high } Begin bar_count = bar_count + 1; Breakout_Range2 = 0; End; End; If this seems too complicated, don't worry. Simply cut and paste the code into TradeStation and then create the following system based on this function: Type : Signal, Name : Breakout_Range2 Input: look_bak(4), n_bars(4); If Breakout_Range2(h, look_bak) <> 0 then {this would only occur if a new high price occured after n_bars of no such new high} Buy ; If BarsSinceEntry >= n_bars then ExitLong; ![]() Note that all of the work of the breakout system went into the breakout function. This is perhaps the best way to develop your ideas: first create a function, then use the function to create indicators, ShowMe studies, and systems. If later you change the function, all the studies on whichit is based will be changed automatically, freeing you from the labor requiredto change each study. |
Авторизация
ОпросыАнонсы Вы никогда не сделаете больших денег, пока не научитесь удерживать свои выигрышные позиции, причем чем дольше вы их держите, тем большим потенциалом получения прибыли обладаете.
Читать далее Разделы Трейдинг. Общие темы
Сколько денег нужно для того, чтобы начать торговать на F... Дериватив Опцион Технический анализ. Введение Психология Трейдинга
Основные причины неудач в торговле Управление эмоциями Диалог с собой Демо торговля опасна! Трейдинг. Системы, стратегии
Трендовые индикаторы и компоненты цен Система Kiss Операция Short Sell – торговля воздухом? Когда торговать на Форекс Управление капиталом
Кубик-рубик из опционов Самозащита на рынках Сохранение капитала-критическая точка Сила правильного управления капиталом Куда вложить деньги
Портфели для одиночек HYIP: мошенничество по-американски Инвестиции в камни: плюсы и минусы Финансовый менеджер и инвестиционный гуру Известные личности Брокеры Литература по Трейдингу
Биржевая игра. Сделай миллионы - играя числами Фундаментальный анализ финансовых рынков. Японские свечи. Графический анализ финансовых рынков Как играть и выигрывать на бирже Индикаторы Рынка
Unit Labour Cost Стоимость единицы выпущенной продукции Unemployment Rate Уровень безработицы Retail Sales Розничные продажи Redbook Еженедельный обзор розничных продаж Форекс руководство
Математические средства технического анализа(техническ... Окна Фигуры продолжения тренда Фигуры разворота тренда Новости, Котировки TradeStation Formulas
Neely31 by Gleen Nelly Moving Beyond the Closing Price by Thomas Stridsman Moving Avg. with Res. and Support System by Dennis Tilley Moving Averages with Resistance and Support by Dennis Tilley Metastock formulas
52 Week Hi-Lo Exploration 5 Day High 5 day EMA of 20 day EMA of 1 day momentum 25x25 Bond System Основные определения Технические индикаторы |
||||
Страница создана за 0.09 секунды


Вы никогда не сделаете больших денег, пока не научитесь удерживать свои выигрышные позиции, причем чем дольше вы их держите, тем большим потенциалом получения прибыли обладаете.