Crypto Update: Coins Hit 6-Week Highs as Rally Continues

Overview

“Gaps” (as they are called in the West) and “windows” (their Japanese counterparts) have always attracted the attention of technicians – most probably because they are nearly impossible to be missed on a price chart. After all, a trading session lying completely outside of the prior day’s range, which is what gaps and windows are by definition, must carry some kind of predictive power. However, a critical question remains – are gaps and windows indicative of the beginning of a new trend (as it was the case for AAPL in Figure 1), or are they simply an overreaction and are subsequently quickly filled (as it was the case for MMM in Figure 2)? Notice how in the former case the gap stayed opened (and it still is) for more than a year, whereas in the latter case the gap was filled/closed within two months (i.e. subsequent price action in September completely overlapped the range of the gap).

Figure 1. AAPL Daily

Figure 2. MMM Daily

Note, from here on, only the term “gap” is used, even though there is an important difference between the two – “gaps” look at intraday prices when determining if they are “filled”, whereas “windows” only look at “closing” prices. At the bottom of the article, you can find references to several works on the price phenomenon, in which the difference between the two variations is discussed in-depth.

Given that gaps occur quite frequently (see referenced materials for details), it is easy to understand how any “gap” strategy can be depicted to have predictive power. Most traditional books on technical analysis include a list of gap trading strategies followed by a few stellar charts that are supposed to prove the strategies’ validity (charts similar to Figures 1 & 2). Furthermore, given gaps’ conspicuous nature, most traditional trading strategies have their “entry” on the day the gap occurs (or Gap Day). For example, proponents of gaps being a continuation pattern would suggest that taking a position in the direction of the gap on Gap Day is profitable. On the other hand, technical analysts who believe that “all gaps get filled” suggest taking a position on Gap Day in the opposite direction of the gap. In both cases, action is taken on Gap Day.

After trading and analyzing gaps for many years, I was certain that traditional theories do not work the way they are described to. Probably the most illogical stipulation made by various technical authors was that “the gap itself should serve as support or resistance” and “once filled, gaps become insignificant”. On the contrary, I had found that the gap itself is rarely a strong support or resistance and that very often the most significant gaps are those that have already been filled. This is when, in 2016, I developed a new theory on gaps (“K-Divergence), which significantly “diverges” from traditional theories.

Before discussing what the K-Divergence theory entails, an explanation of the most popular traditional theories is presented.

Traditional Gap Theories

1. A gap is a continuation pattern.

Strategy – taking a position, on Gap Day, in the direction of the gap.

This theory is based on the idea that if, on any given day, prices jump/fall significantly enough to never touch the prior session’s price range, something significant must have occurred and changed the market’s sentiment on the company. In this case, on Gap Day, prices are assumed to reflect the changing opinion of the stock only partially, and thus, further movement in the direction of the gap is expected. In the case of AAPL’s gap (Figure 1), on February 1, 2017, the company reported better-than-expected 1Q17 earnings on the heels of record breaking iPhone sales. Subsequently, the price continued moving higher in a swift fashion, leaving the up-gap behind it. Often, proponents of this theory use support and resistance levels, or technical indicators, as a confirmation that the gap has occurred at an important juncture and that it can be trusted. For example, zooming out and looking at the stock’s price action since 2015 (Figure 3), traders who utilize gaps as continuation patterns can claim that “the breakout occurred above the interim high of the multiple bottom formation, and therefore, carried high predictive power”.

Figure 3. AAPL 2-Day Chart

2. A gap is an overreaction.

Strategy – taking a position, on Gap Day, in the opposite direction of the gap

Advocates of this theory are convinced that gaps are a result of market participants overreacting to news (or “noise”) and that once participation subsides, the gap is expected to get filled. The famous adage “all gaps get filled” is often used in an attempt to support this supposition. Similar to the previous strategy, support/resistance levels and technical indicators are expected to provide further confirmation if the particular gap is to be filled. For example, looking once again at the MMM chart (2-day chart – Figure 4), one may say that the down-gap took prices close to a well-established uptrend (green trendline) and to a key moving average (100 SMA – yellow line). Also, to further support the thesis that prices will reverse, one may point to the positive reversal in RSI (not to be confused with a positive divergence), which indicated that the correction has taken the stock to oversold levels during the uptrend (i.e. RSI making a lower low, while prices making a higher low).

Figure 4. MMM 2-Day Chart

The above two strategies are a perfect example of technical analysis being more of an “art” than “science”, where it is up to the technician’s discretion to decide what action to take after observing a gap. While, after testing both strategies (see K-Divergence section), I found that neither the simple continuation nor reversal strategies are profitable on a systematic basis, there are definitely specific situations where the probability of a gap reversing is higher and vice versa. Unfortunately, the next strategy, the one found in almost any TA book, is one of the reasons why technical analysis has a bad name among most non-technicians.

3. A gap could be either a continuation pattern or an overreaction based on its “classification”.

Strategy – an ambiguous one based on hindsight

As it had become evident that gaps cannot be all “continuation patterns” or “overreactions”, the popular gap classification system was born – where gaps are categorized as either “breakaway”, “continuation/runaway”, “exhaustion” and “common”. This classification is based on two criteria – 1) the location of the gap relative to preceding price action and 2) whether the gap gets filled or not. However, as one can imagine, there is no way to know on Gap Day whether a gap will be filled in the future. That is, the classification system is based on hindsight. Let’s prove this point by looking at an example. Figure 5 shows an up-gap after a prolonged uptrend. Based on the widely-used classification system this gap can be “runaway” (if the gap does not get filled and prices continue higher), “exhaustion” (if prices quickly reverse, fill the gap and continue lower) or even “common” (if prices fill the gap but do not reverse or consolidate). Given the colour of the candle and the long upper wick, it seems like it is an “exhaustion” gap, right?

Figure 5. Daily Chart (real chart, ticker hidden)

Clearly, it is only in hindsight that this gap can be classified. In this case, the gap turned out to be of the “runaway” type as it did not get filled and the stock (MSFT) continued propelling higher (Figure 6). The point is, the classification system is futile for making decisions on Gap Day.

Figure 6. MSFT Daily Chart

K-Divergence (K-Div) Theory

4. Most gaps occur after prices have moved away from a significant support or resistance levels.

Strategy – taking a position in the direction of the gap, only after prices have returned to pre-gap levels

More specifically, the theory suggests that in most cases an up-gap transpires after prices have already jumped from a key support level and a down-gap – after prices have already fallen from a key resistance level. The theory is based on the premise that before a gap occurs prices have already reached a key level and have bounced from it. It is only later on, after most market participants agree on the direction of the next move and take positions in the same direction that gaps occur. This means that it is not the gap itself that should serve as a support or resistance, but rather the range of prices preceding it (pre-gap range). The most important implications of the theory are – 1) the gap itself should not serve as support or resistance and 2) a filled gap is not “insignificant”.

So why does the K-Divergence make sense from a technical point of view? After all, if prices gapped due to “news” that nobody was aware of, this would mean that gaps are nothing more than prices adjusting to the new information. Any such conclusion should render fundamental and technical analysis useless, for it would imply that no analyst is able to purchase a security before news gets disseminated. On the contrary, the K-Divergence assumes that the most astute market participants (i.e. the best fundamental and technical analysts, quants and even “insiders”) are able to trade in advance of the gap occurring. Therefore, true support and resistance levels lie prior to the gap transpiring and subsequent filling of the gap does not render it “insignificant”.  It is best to illustrate this with an example. I will use one of my most recent predictions based on the theory, which was sent to one of my clients. First, I will describe the rational in detail with an updated chart (Figure 7), which will be followed by screenshots from the day the signal was given.

After the close on February 1, 2018, Google reported its 4Q18. The next day, the stock opened sharply lower and continued falling into the close (Feb 2 – Down Gap in Figure 7). The stock continued falling along with the market until the Feb 9 low was set. Subsequently, while NASDAQ was making new highs in early March, GOOG reached the pre-gap range (Bearish K-Divergence Range – violet horizontal trendlines) and started stalling. Due to the strong bounce by the broader markets, the stock recovered and filled the gap. However, when the stock started trading at the pre-gap range, market participants were given a second chance to sell the stock for the same price it was trading at before the 4Q18 earnings were released. Price action confirmed the bearishness of the set-up (GOOG March 13 & 16 – Figures 8 & 9).

Figure 7. GOOG Daily Chart

Figure 8. GOOG March 13

Figure 9. GOOG March 16

In order to validate the theory, I developed two trading strategies based on it (one with the gap and one with the window variation) and backtested them along with 5 variations of the traditional gap strategies discussed above. Figure 10 shows the 1-, 2-, 5-, 10-, 20-, 30- and 44-day period returns of the 7 strategies (#6 & 7 being the two based on the K-Divergence theory) and Figure 11 shows the annualized returns for the those same periods. The backtest took into account a total of 14,219 gaps over nearly a 2-year period.

Figure 10. 1-, 2-, 5-, 10-, 20-, 30- and 44-day period returns

Figure 11. Annualized 1-, 2-, 5-, 10-, 20-, 30- and 44-day period returns

The two K-Div strategies were profitable throughout all periods. The only other consistently profitable strategy was “Fading the Gap” strategy which entailed taking a position in the opposite direction of the gap on Gap Day, but closing it immediately after the gap was filled. This once again goes against traditional theories which suggest that once a gap is filled, prices should continue going against the gap’s direction as, supposedly, an important support/resistance was breached.

It is noteworthy that the K-Divergence theory does not suggest that all gaps have occurred after important support/resistance levels or that they can all be traded profitably in a similar fashion as the GOOG example. Rather, it provides a framework for analyzing the gap phenomenon, on that all active investors/traders should believe in, which assumes that some market participants are able to act ahead of major moves (i.e. prior to the appearance of gaps). Furthermore, it eliminates the use of the “hindsight” gap classification system.

For more on gaps, I recommend reading Julie R. Dahlquist and Richard J. Bauer’s “Technical Analysis of Gaps” book, where they conduct, one of the first on the topic, objective investigations of the phenomenon. For a much more in-depth coverage of the K-Divergence and my research on gaps, you can view my thesis for the Master of Financial Technical Analysis (MFTA) Program, published in the 2018 IFTA Annual Journal.

Conclusion

In the future, regardless of whether you look for opportunities to trade gaps on Gap Day (strategies 1 & 2) or decide to use the K-Divergence as part of your trading arsenal, I hope this article would make you think more critically the next time you hear terms such as the “runaway” gap. And even more importantly, will push you to analyze gaps even after they have been filled, and according to traditional theory, have become insignificant.

Happy gap trading.

Featured image courtesy of Shutterstock. 

فیلترشکن پرسرعت

Technical Analysis: Bitcoin Tests $9000 as Altcoins Pull Back after Strong Rally

Overview

“Gaps” (as they are called in the West) and “windows” (their Japanese counterparts) have always attracted the attention of technicians – most probably because they are nearly impossible to be missed on a price chart. After all, a trading session lying completely outside of the prior day’s range, which is what gaps and windows are by definition, must carry some kind of predictive power. However, a critical question remains – are gaps and windows indicative of the beginning of a new trend (as it was the case for AAPL in Figure 1), or are they simply an overreaction and are subsequently quickly filled (as it was the case for MMM in Figure 2)? Notice how in the former case the gap stayed opened (and it still is) for more than a year, whereas in the latter case the gap was filled/closed within two months (i.e. subsequent price action in September completely overlapped the range of the gap).

Figure 1. AAPL Daily

Figure 2. MMM Daily

Note, from here on, only the term “gap” is used, even though there is an important difference between the two – “gaps” look at intraday prices when determining if they are “filled”, whereas “windows” only look at “closing” prices. At the bottom of the article, you can find references to several works on the price phenomenon, in which the difference between the two variations is discussed in-depth.

Given that gaps occur quite frequently (see referenced materials for details), it is easy to understand how any “gap” strategy can be depicted to have predictive power. Most traditional books on technical analysis include a list of gap trading strategies followed by a few stellar charts that are supposed to prove the strategies’ validity (charts similar to Figures 1 & 2). Furthermore, given gaps’ conspicuous nature, most traditional trading strategies have their “entry” on the day the gap occurs (or Gap Day). For example, proponents of gaps being a continuation pattern would suggest that taking a position in the direction of the gap on Gap Day is profitable. On the other hand, technical analysts who believe that “all gaps get filled” suggest taking a position on Gap Day in the opposite direction of the gap. In both cases, action is taken on Gap Day.

After trading and analyzing gaps for many years, I was certain that traditional theories do not work the way they are described to. Probably the most illogical stipulation made by various technical authors was that “the gap itself should serve as support or resistance” and “once filled, gaps become insignificant”. On the contrary, I had found that the gap itself is rarely a strong support or resistance and that very often the most significant gaps are those that have already been filled. This is when, in 2016, I developed a new theory on gaps (“K-Divergence), which significantly “diverges” from traditional theories.

Before discussing what the K-Divergence theory entails, an explanation of the most popular traditional theories is presented.

Traditional Gap Theories

1. A gap is a continuation pattern.

Strategy – taking a position, on Gap Day, in the direction of the gap.

This theory is based on the idea that if, on any given day, prices jump/fall significantly enough to never touch the prior session’s price range, something significant must have occurred and changed the market’s sentiment on the company. In this case, on Gap Day, prices are assumed to reflect the changing opinion of the stock only partially, and thus, further movement in the direction of the gap is expected. In the case of AAPL’s gap (Figure 1), on February 1, 2017, the company reported better-than-expected 1Q17 earnings on the heels of record breaking iPhone sales. Subsequently, the price continued moving higher in a swift fashion, leaving the up-gap behind it. Often, proponents of this theory use support and resistance levels, or technical indicators, as a confirmation that the gap has occurred at an important juncture and that it can be trusted. For example, zooming out and looking at the stock’s price action since 2015 (Figure 3), traders who utilize gaps as continuation patterns can claim that “the breakout occurred above the interim high of the multiple bottom formation, and therefore, carried high predictive power”.

Figure 3. AAPL 2-Day Chart

2. A gap is an overreaction.

Strategy – taking a position, on Gap Day, in the opposite direction of the gap

Advocates of this theory are convinced that gaps are a result of market participants overreacting to news (or “noise”) and that once participation subsides, the gap is expected to get filled. The famous adage “all gaps get filled” is often used in an attempt to support this supposition. Similar to the previous strategy, support/resistance levels and technical indicators are expected to provide further confirmation if the particular gap is to be filled. For example, looking once again at the MMM chart (2-day chart – Figure 4), one may say that the down-gap took prices close to a well-established uptrend (green trendline) and to a key moving average (100 SMA – yellow line). Also, to further support the thesis that prices will reverse, one may point to the positive reversal in RSI (not to be confused with a positive divergence), which indicated that the correction has taken the stock to oversold levels during the uptrend (i.e. RSI making a lower low, while prices making a higher low).

Figure 4. MMM 2-Day Chart

The above two strategies are a perfect example of technical analysis being more of an “art” than “science”, where it is up to the technician’s discretion to decide what action to take after observing a gap. While, after testing both strategies (see K-Divergence section), I found that neither the simple continuation nor reversal strategies are profitable on a systematic basis, there are definitely specific situations where the probability of a gap reversing is higher and vice versa. Unfortunately, the next strategy, the one found in almost any TA book, is one of the reasons why technical analysis has a bad name among most non-technicians.

3. A gap could be either a continuation pattern or an overreaction based on its “classification”.

Strategy – an ambiguous one based on hindsight

As it had become evident that gaps cannot be all “continuation patterns” or “overreactions”, the popular gap classification system was born – where gaps are categorized as either “breakaway”, “continuation/runaway”, “exhaustion” and “common”. This classification is based on two criteria – 1) the location of the gap relative to preceding price action and 2) whether the gap gets filled or not. However, as one can imagine, there is no way to know on Gap Day whether a gap will be filled in the future. That is, the classification system is based on hindsight. Let’s prove this point by looking at an example. Figure 5 shows an up-gap after a prolonged uptrend. Based on the widely-used classification system this gap can be “runaway” (if the gap does not get filled and prices continue higher), “exhaustion” (if prices quickly reverse, fill the gap and continue lower) or even “common” (if prices fill the gap but do not reverse or consolidate). Given the colour of the candle and the long upper wick, it seems like it is an “exhaustion” gap, right?

Figure 5. Daily Chart (real chart, ticker hidden)

Clearly, it is only in hindsight that this gap can be classified. In this case, the gap turned out to be of the “runaway” type as it did not get filled and the stock (MSFT) continued propelling higher (Figure 6). The point is, the classification system is futile for making decisions on Gap Day.

Figure 6. MSFT Daily Chart

K-Divergence (K-Div) Theory

4. Most gaps occur after prices have moved away from a significant support or resistance levels.

Strategy – taking a position in the direction of the gap, only after prices have returned to pre-gap levels

More specifically, the theory suggests that in most cases an up-gap transpires after prices have already jumped from a key support level and a down-gap – after prices have already fallen from a key resistance level. The theory is based on the premise that before a gap occurs prices have already reached a key level and have bounced from it. It is only later on, after most market participants agree on the direction of the next move and take positions in the same direction that gaps occur. This means that it is not the gap itself that should serve as a support or resistance, but rather the range of prices preceding it (pre-gap range). The most important implications of the theory are – 1) the gap itself should not serve as support or resistance and 2) a filled gap is not “insignificant”.

So why does the K-Divergence make sense from a technical point of view? After all, if prices gapped due to “news” that nobody was aware of, this would mean that gaps are nothing more than prices adjusting to the new information. Any such conclusion should render fundamental and technical analysis useless, for it would imply that no analyst is able to purchase a security before news gets disseminated. On the contrary, the K-Divergence assumes that the most astute market participants (i.e. the best fundamental and technical analysts, quants and even “insiders”) are able to trade in advance of the gap occurring. Therefore, true support and resistance levels lie prior to the gap transpiring and subsequent filling of the gap does not render it “insignificant”.  It is best to illustrate this with an example. I will use one of my most recent predictions based on the theory, which was sent to one of my clients. First, I will describe the rational in detail with an updated chart (Figure 7), which will be followed by screenshots from the day the signal was given.

After the close on February 1, 2018, Google reported its 4Q18. The next day, the stock opened sharply lower and continued falling into the close (Feb 2 – Down Gap in Figure 7). The stock continued falling along with the market until the Feb 9 low was set. Subsequently, while NASDAQ was making new highs in early March, GOOG reached the pre-gap range (Bearish K-Divergence Range – violet horizontal trendlines) and started stalling. Due to the strong bounce by the broader markets, the stock recovered and filled the gap. However, when the stock started trading at the pre-gap range, market participants were given a second chance to sell the stock for the same price it was trading at before the 4Q18 earnings were released. Price action confirmed the bearishness of the set-up (GOOG March 13 & 16 – Figures 8 & 9).

Figure 7. GOOG Daily Chart

Figure 8. GOOG March 13

Figure 9. GOOG March 16

In order to validate the theory, I developed two trading strategies based on it (one with the gap and one with the window variation) and backtested them along with 5 variations of the traditional gap strategies discussed above. Figure 10 shows the 1-, 2-, 5-, 10-, 20-, 30- and 44-day period returns of the 7 strategies (#6 & 7 being the two based on the K-Divergence theory) and Figure 11 shows the annualized returns for the those same periods. The backtest took into account a total of 14,219 gaps over nearly a 2-year period.

Figure 10. 1-, 2-, 5-, 10-, 20-, 30- and 44-day period returns

Figure 11. Annualized 1-, 2-, 5-, 10-, 20-, 30- and 44-day period returns

The two K-Div strategies were profitable throughout all periods. The only other consistently profitable strategy was “Fading the Gap” strategy which entailed taking a position in the opposite direction of the gap on Gap Day, but closing it immediately after the gap was filled. This once again goes against traditional theories which suggest that once a gap is filled, prices should continue going against the gap’s direction as, supposedly, an important support/resistance was breached.

It is noteworthy that the K-Divergence theory does not suggest that all gaps have occurred after important support/resistance levels or that they can all be traded profitably in a similar fashion as the GOOG example. Rather, it provides a framework for analyzing the gap phenomenon, on that all active investors/traders should believe in, which assumes that some market participants are able to act ahead of major moves (i.e. prior to the appearance of gaps). Furthermore, it eliminates the use of the “hindsight” gap classification system.

For more on gaps, I recommend reading Julie R. Dahlquist and Richard J. Bauer’s “Technical Analysis of Gaps” book, where they conduct, one of the first on the topic, objective investigations of the phenomenon. For a much more in-depth coverage of the K-Divergence and my research on gaps, you can view my thesis for the Master of Financial Technical Analysis (MFTA) Program, published in the 2018 IFTA Annual Journal.

Conclusion

In the future, regardless of whether you look for opportunities to trade gaps on Gap Day (strategies 1 & 2) or decide to use the K-Divergence as part of your trading arsenal, I hope this article would make you think more critically the next time you hear terms such as the “runaway” gap. And even more importantly, will push you to analyze gaps even after they have been filled, and according to traditional theory, have become insignificant.

Happy gap trading.

Featured image courtesy of Shutterstock. 

فیلترشکن پرسرعت

GDAX Pocket UI – یادداشت های مهندس

من برخی از زمان ها درباره الگوریتمیک تجارت نوشته ام، و اینکه چگونه برای مهندسان نرم افزار برای انجام تمرینات مغزی خود بسیار مفید است. من برخی از نکات کد را ارائه کرده ام و یک دستورالعمل منطقی کلی در مورد مسیرها، اهداف و فرصت های بالقوه تجارت الگوریتمی می تواند منجر شود. اکنون زمان آن است که قدم برداریم و آماده استفاده، برنامه بازرگانی مبادله شده و شخصی باشیم.

در اینجا من در حال حاضر GDAX Pocket UI:

GDAX Pocket UI

UDA Pocket GDAX یک پروژه منبع باز شما است می تواند در GitHub پیدا کند: https://github.com/rinchik/gdax-pocket-ui

اولین تکرار این پروژه محدود به حساب ها و معاملات Ethereum است، اما می تواند به راحتی برای استفاده در بیت کوین و سایر حساب های موجود در Cryptocurrency گسترش یابد در Coinbase و GDAX.

UI

در گوشه بالا سمت چپ یک قیمت قیمت گذاری شده است که نشان دهنده زمان واقعی تغییر قیمت Ethereum است:

آخرین قیمت اتریم

مجموع مانده حساب در گوشه بالا سمت راست :

مجموع حساب متعادل

سرصفحه حاوی نمودار ترسیم بصری برای نظارت بر نوسان قیمت در زمان واقعی (هنوز WIP):

قیمت تیکر گراف

پس از هدر شما می توانید کاشی با اطلاعات حساب و توازن :

اطلاعات حساب

با دکمه های عمل می توانید پ توری فروش / خرید سفارشات محدود. حد پیش فرض 1 روز است:

دکمه های عمل

بخش های فعال بخش به شما نشان می دهد تمام سفارش های فعال قرار داده شده برای حساب Ethereum خود را با توانایی لغو آن. سفارشات فروش در قرمز نمایش داده می شود و سبز خریداری می شود:

بخش سفارشات فعال

این پروژه ها به عنوان یک رابط کاربری کوچک برای API GDAX آغاز شد که به من اجازه می داد معاملات من را انجام دهد و نظم های من را نظارت کند و از آن زمان به یک نرم افزار مناسب با UI دلخواه

GDAX یک پلت فرم عالی است که یک API تجاری گسترده را فراهم می کند، اما یک نقص وجود دارد: خود GDAX تنها به استفاده از دسکتاپ محدود می شود. [فقط کاربران ثبت نام شده می توانند لینک ها را ببینند.]

Algorithmic Trading

وقتی که شما علاقه مند به تجارت الگوریتم هستید، باید تمرکز کنید و " سرمایه گذاری "در همه زمان ها. هدف این است که شناسایی و استخراج تمام الگوهایی را که می توانید پیدا کنید، این هدف مهم ترین بخش تعریف استراتژی های تجاری خود را شما می توانید در آینده خودکار کنید.

همیشه قادر باشید برای نظارت و بلافاصله واکنش نشان می دهند زمانی که شما یک فرصت تجاری را مشاهده می کنید دشوار است زمانی که دسترسی به لپ تاپ شخصی خود را در طول روز محدود کنید (به عنوان مثال کار تمام وقت) که منجر به گرفتن حساب آنلاین GDAX توسط نوشتن یک برنامه ساده تلفن همراه که من می توانم به طور ایمن در تلفن من (بیش از VPN شخصی من) دسترسی دارم وقتی که من دور از خانه برای نظارت، کنترل معاملات و سفارشات هر زمان که من می خواهم و یا نیاز است.

GDAX Pocket UI

هنگام ایجاد این برنامه، هدف اصلی من امنیت و به عنوان محدود بودن مواجهه با جهان خارج بود. اگر نگاهی به بسته package.json بیاندازید، خواهید دید که میزان وابستگی های شخص ثالث بسیار محدود است، وقتی که طرف سرور بسیار کوچک است و فقط به عنوان یک پروکسی بین رابط کاربر و API GDAX عمل می کند، UI دارای وزن مخصوص توسعه است و از ابتدا با VanillaJS ساخته شده است (شما می توانید در مورد یکی از مقالات قبلی خود در مورد وانیلی مدرن در جهان جاوا اسکریپت بیشتر بخوانید) بدون وابستگی شخص ثالث صریح:

وابستگی UI Pocket UDA

همه HTML عناصر در این برنامه دوباره تعریف شده و با API های جدید مورد نیاز گسترش می یابند و با آنچه شما می توانید با آن تماس بگیرید قابلیت سفارشی مجازی DOM .

تنها وابستگی UI که برای ارتقاء در SVG سفارشی استفاده می شود نمودار تیکر و ارزش ذکر شده است https://socket.io/

هنگام کار بر روی UDP جیبی Pocket، حتی اگر این برنامه کوچک با VanillaJS نوشته شده است (حتی تماسهای AJAX)، این واقعا آن را دوست ندارد ، آن را مانند کار با زبان بالغ در یک ساختمان احساس می کند طرح ریخته شده:

GDAX Pocket UI Development

یادداشتهای امنیتی

بسیار مهم است که توجه کنیم که نباید هیچگونه نگرانی امنیتی بالقوه را از دست داد. من به شدت توصیه می کنم قبل از اجرای این برنامه برای بازنگری کد منبع پایه با دقت و اگر شما هر گونه اشکالات و یا حفره امنیتی بالقوه را پیدا کنید، مسائل، نگرانی آنها را بلافاصله گزارش. من از سهم شما در این پروژه کوچک تشکر می کنم.

قبل از اجرای این برنامه در حالت تولید، آن را با Gboxbox sandbox تست کنید: https://docs.gdax.com/#sandbox . [19659038] من نمی توانم به اندازه کافی استرس داشته باشم نباید این برنامه را در سرورها یا سرویس های قابل دسترسی عمومی میزبانی کند، آن را به صورت محلی میزبانی کند و از آن طریق تونل VPN امن دسترسی پیدا کند (شما می توانید دستورالعمل های دقیق در مورد نحوه راه اندازی VPN شخصی خود را پیدا کنید سرور در مقاله قبلی من) به عنوان آن را به طور مستقیم با امور مالی شخصی شما مرتبط است.

امیدوارم این برنامه وب موبایل در سفر شما به کمال از مهارت های بازرگانی شخصی شما مفید باشد.

تجارت الگوریتمی با NodeJs – یادداشت های مهندس

با دسترسی ما به بازار سهام، تجارت الگوریتم (تجارت الگوریتم، تجارت سیاه و سفید و غیره) به نظر می رسد مانند یک پروژه جانبی بسیار جذاب، یک گزینه جذاب برای بالقوه افزایش ثروت ما و همچنین یک تمرین مغرضانه برای توسعه دهندگان احتمالا قبلا می دانید که بازارهای سهام ما و هر چیزی که مربوط به امور مالی است، به شدت تنظیم می شود، با بسیاری از گواهینامه ها و گواهینامه های لازم، که به نظر می رسد یک مبتدی است که نمی خواهد با آن مقابله کند. پس ما چه کار میکنیم؟ ما با ریسک بیشتری شروع می کنیم، اما برای گزینه های ما بیشتر به ما امکان می دهد: معاملات معکوس ارز. بازار های رمزنگاری مانند تنظیمات شدید نیست و سیستم عامل های تجاری مانند GDAX.com فرصتی عالی برای شروع و توسعه مدل های معاملاتی خود را ارائه می دهند. نقطه شروع برای شما و خلاقیت شما، ما بر اساس پایه راه اندازی بر اساس که شما می توانید شروع به ساخت پلت فرم معاملاتی الگوریتم خود را بسیار خود را.GDAX فراهم می کند API به خوبی مستند و همچنین یک بومی NodeJS مشتری. (شما می توانید مستندات API را در اینجا پیدا کنید: https://docs.gdax.com/) شروع به کار کنید. من فرض می کنم که خوانندگان در حال تجربه اولیه با جاوا اسکریپت و NodeJ ها هستند و شما یک حساب فعال با Coinbase و GdaxCreate دارید بسته تجاری: mkdir tradingcd tradingtouch index.jsnpm initAdd کتابخانه GDAX-NODE به عنوان وابستگی پروژه شما: npm install gdaxExcellent. حالا کد را امتحان کنید ما با استفاده از API عمومی شروع می کنیم که نیازی به داشتن یک حساب کاربری ثبت نشده است. می توانید ببینید که محصولات Gdax چگونه می توانیم تجارت کنیم: const GDAX = require ('gdax')؛
const publicClient = new GDAX.PublicClient ()؛ const callback = (خطا، پاسخ، داده) => {
اگر (خطا)
بازگشت console.dir (خطا)؛ return console.dir (data)؛
} publicClient.getProducts (callback)؛ شما یک خروجی شبیه به این دریافت خواهید کرد: محصولات Gdax این اطلاعات مفید برای شما است که از زمان به زمان چک کنید تا اطمینان حاصل کنید که سفارشات شما سطر بالا و پایین. دیگر روش مفید است که ما می توانیم با مشتری عمومی امتحان کنیم getCurrencies (): publicClient.getCurrencies (callback)؛ کدام این خروجی را تولید می کند: Gdax currenciesReally easy! درست؟ در حال حاضر اجازه می دهید به بخش سرگرم کننده بیشتری دست پیدا کنید: با حساب Gdax خود کار کنید. به https://www.gdax.com/settings/api بروید و یک کلید API ایجاد کنید، فقط برای بازی کردن و تست توصیه می کنم فقط مجوز READ را اعطا کنم به key.Now به index.js ما اجازه می دهد تا خودمان را تایید کنیم: const passPhrase = "yourPasssPhrase"؛ const apiKey = "yourAPIkey"؛ const base64secret = "somethingSomethingBase64 =="؛ const apiURI = 'https: //api.gdax .com '؛ const authenticatedClient = جدید GDAX.AuthenticatedClient (apiKey، base64secret، passPhrase، apiURI)؛ عالی است، حالا می توانیم شروع به کار با حساب ها کنیم و جادوهای برنامه نویسی پولمان را بازیابی کنیم. ببینیم حساب هایمان واقعا چه هستند: authenticatedClient. getAccounts (callback)؛ خروجی شبیه به این را دریافت خواهید کرد: Gdax AccountsThis یک روش ضروری است که به شما اجازه می دهد تا تعادل خود را در تمام حساب های خود بررسی کنید و اطلاعات حساب خود را بدست آورید. هنگامی که همه شناسه های حسابتان را می شناسید، می توانید هر حساب را به صورت جداگانه پرس و جو کنید، برای کنترل دقیق تر: const ACCOUNT_ETH = 'some super-long-account-id'؛ authenticatedClient.getAccount (ACCOUNT_ETH، callback)؛ خوب، همه این عالی است! و ما احتمالا قبلا در مورد استراتژی های معاملاتی فکر کرده ایم و اولین چیزی که شما در مورد آن می پرسید چگونه می توانید قیمت ارز فعلی را بدست آورید. این مشکل است. GDAX به طور فعال از رای گیری این اطلاعات (بمباران با درخواست ها)، اگر شما نظرسنجی شما را به احتمال زیاد به محدودیت های خود را محدود خواهد شد و یا حتی قفل شده است، بنابراین نگذارید. پس چگونه قیمت فعلی را بدست آورید؟ این کمی روی حیله و تزویر است، اما از corse، قابل انجام است. برای این منظور ما باید ارتباط سوکت با سرورهای خود را ایجاد کنیم و به تمام اطلاعاتی که از طریق آن می رویم را فیلتر کنیم و با کمک WebsocketClient آنها را فیلتر کنیم. یک محصول، اتریم را انتخاب می کنیم به عنوان مثال: const ETH_USD = 'ETH-USD'؛ const websocket = جدید GDAX.WebsocketClient ([ETH_USD])؛
const websocketCallback = (data) => console.dir (data)؛ websocket.on ('message '، websocketCallback)؛ خروجی بسیار سریع خواهد بود و به نظر می رسد چیزی شبیه به این: خروجی مشتری Websocket حالا چطور می توانیم قیمت اتریم فعلی را از این ناپایدار دریافت کنیم؟ ما شاهد سفارشهای زیادی هستیم، برخی از آنها فقط دریافت می شوند، برخی هنوز باز هستند. پس از گذراندن اسناد، روشن است که ما تنها به منظور پر کردن و / یا انجام دادن علاقه مند هستیم. معنی فروش فروش فقط بسته شد (در واقع اتفاق افتاده) و ما می توانیم از اطلاعات قیمت که با آن سفارش استفاده کردیم. تماس تلفنی اصلاح شده برای ردیابی قیمت های فعلی: const websocketCallback = (data) => {
if (! (data.type == = 'انجام' && data.reason === 'پر'))
بازگشت؛ console.dir (data)؛
} بام! اکنون همه چیز برای شروع منطق معاملاتی شما ایجاد شده است. شما حساب های خود دارید با تمام اطلاعات مورد نیاز و تعادل، و در حال حاضر شما حتی می توانید پیگیری تغییر قیمت اتریم. Okay. اجازه دهید بگوییم اول نسخه الگوریتم شما را نهایی کرده اید، چگونه ما در واقع تجارت می کنیم؟ const websocketCallback = (data) => {
if (! (data.type === 'done' && data.reason === ' پر کردن '))
بازگشت؛ تجزیه و تحلیل const = someBrilliantAnalyticalMethod (data)؛ اگر (analytics.buy)
return placeBuyOrder (analytics.buyDetails) if (analytics.sell)
return placeSellOrder (analytics.sellDetails)
} چگونه می توان خرید و فروش سفارشات را انجام دادیم؟ بسیار ساده، برگشت به مشتری تایید شده ما: function placeBuyOrder (buyDetails) {
const buyParams = {
'price': buyDetails.price،
'size': buyDetails.size،
'product_id': ETH_USD،
}؛ این […] خریداری شده است، خریداری شده است، خرید (فروش پارامترها، فراخوانی)؛
} function placeSellOrder (buyDetails) {
const sellParams = {
'price': buyDetails.price،
'size': buyDetails. اندازه،
'product_id': ETH_USD،
}؛ این توجه کنید که روش های خرید و فروش اعتباردهنده مشتری، شناسه سفارشاتی را که برای ذخیره چک برای انجام تحویل در آینده نیاز دارید ذخیره می کند. برای بررسی تمام سفارشات قرار داده شده: authenticatedClient.getOrders ( callback)؛ برای بررسی وضعیت یک سفارش فرد: authenticatedClient.getOrder (orderID، callback)؛ این همان است. بسیار آسان برای شروع. هشدار اصلی و منبع موفقیت شما در داخل someBrilliantAnalyticalMethod () ذکر شده است، که در کد بالا ذکر شده است که بعدا بسته به استراتژی انتخاب شده می تواند به دنیای واقعی سهام و اوراق قرضه معرفی شود. هر کس پیاده سازی متفاوت و منحصر به فرد داشته باشد، بنابراین به عنوان خوانده شده، تمرین، از دست دادن پول، لحن، تمرین و کامل دوباره. بهترین ضربه و قوی باد در پشت! به روز رسانی: برخی از قطعه کد در این مقاله از تاریخ است، برای تحولات و اصلاحات اخیر شما می توانید این پروژه را در Gighub دنبال کنید: https://github.com/rinchik/gdax-pocket-ui که در اینجا توضیح داده شده است: https://blog.rinatussenov.com/algorithmic-trading-with-nodejs -gdax-pocket-ui-150e227d0d6a

Bitcoin: $25.000 سال پایان? | هک. com

عمل دو رو، اما به طور کلی صعودی قیمت در cryptocurrencies امروز در اوایل، با altcoins بزرگ اضافه کردن به خود دستاوردهای اخیر ، تجارت در حالی که outperforming Bitcoin نسبتا ضعیف ادامه داد. به عنوان بزرگترین سکه هنوز زیر آن بالا کوتاه مدت اخیر است که 8400، ارزش کل بخش بالای علامت 350 میلیارد دلار با وجود عملکرد قوی Ethereum Bitcoin موج دار شدن و پول نقد معلق در هوا است. موج دار شدن آمار هدف بعدی را نزدیک $0.84 یک شبه ما انتظار می رود، در حالی که Ethereum صدر $575 میان وسیع شد، در حالی که ما مدل روند به خنثی با توجه به رهبران تغییر.

حتی اگر Ethereum به وضوح قوی تر از Bitcoin از دیدگاه کوتاه مدت، سکه های دو در بسیار شبیه setups فنی بازرگانی حق در خط روند بلند مدت در مناطق مقاومت بسیار قوی است.  آنها بالاتر از سطح آن شکستن باید، خواهد بود تغییر روند اصلی اگر چه حرکت خطر شکست خورده را در بخش تایید هنوز موجود خواهد بود.

BTC/دلار 4 ساعته نمودار تجزیه و تحلیل

Bitcoin ممکن است آماده برای حرکت بالا مقاومت اولیه امروز و با خط روند کاهش نیز در منطقه، خروش در فعالیت تجاری محتمل است. حرکت سریع به منطقه 9000 دلار-$ 9200 در کارت، اما حتی در حالی که ما انتظار داریم که این تجمع در ادامه با توجه به ضعف کوتاه مدت اخیر معامله گران کوتاه مدت برخی از تراشه کردن جدول، می تواند. روند صعودی جدید در حالی که بسیاری از altcoins در حال حاضر شده است هنوز هم نه در BTC تایید الگوی بالا بالاتر و بالاتر پایین است. در حالی که پشتیبانی در بر داشت درست بالای $7650 منطقه نزدیک به 9000 $ هدف بعدی در 10،000، است.

ETH/دلار 4 ساعته نمودار تجزیه و تحلیل

Ethereum تست خط روند کاهش نیز هست و حرکت به آینده منطقه مقاومت نزدیکی 625 دلار در روزهای آینده سکه هم اکنون در روند صعودی کوتاه مدت روشن است. شاخص MACD صعودی است و هنوز هم وجود دارد اتاق را برای سود قبل از آن وارد قلمرو تشخیص. که با توجه به مقاومت قوی در منطقه جلو، معامله گران کوتاه مدت کمی باید مواضع خود را کاهش دهد و و صبر کنید با ورود به معاملات جدید در حالی که سرمایه گذاران بلند مدت به سکه های خود را نگه دارید باید گفت:.  بالا دلار 625, مقاومت بیشتر پیش رو است که 735 و 780 دلار، در حالی که پشتیبانی اولیه در 500 دلار است.

رهبران کشیده پس از قوی پیشرفته

XRP/USD، 4 ساعته نمودار تجزیه و تحلیل

در حالی که قیمت اقدام مثبت از یک چشم انداز دراز مدت است برخی از سکه دوباره شده کوتاه مدت overbought و معامله گران باید به تعقیب رهبران اینجا، با امثال Monero موج دار شدن فاصله و ستاره ای در حال حاضر برای دیگر قلاب شود.

ادامه هم بستگي به شکستن این سکه است که هنوز overbought هستند در برای سود بیشتر با رهبر اولیه این تجمع EOS حرکت فقط از الگوی تثبیت آن در کوتاه مدت می تواند به عنوان. روز بعد می تواند تعیین کننده در مورد سرنوشت این تجمع اما در حال حاضر راه اندازی بلند مدت دلگرم کننده است به جای و شانس شکوفایی با دوام بالا هستند.

برای ما تجزیه و تحلیل فنی دقیق است بعدها در امروز بیرون باشید.

تصویر برجسته از Shutterstock

سلب مسئولیت: تحلیلگر صاحب cryptocurrencies. او دارای سرمایه گذاری در سکه ها موقعیت اما در کوتاه مدت و یا معامله در روز درگیر می کند و او را نگه ندارد موقعیت های کوتاه مدت را در هر یک از سکه ها.

فیلترشکن پرسرعت