$ erlc -S test.erl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"fmt" | |
"io" | |
"log" | |
) |
- 不要用1分钟图,用5分钟图。
- 当你能用一两个setup稳定赚钱之后,尝试增大position而非增加setup来多赚。
- 一个bar形成的最后一段时间非常关键,要靠读bar来做交易,一定等bar走完了再下决定。
- 怎么学读图?把每张图打印出来,找出机会,看机会附近都发生了什么,几周之后你会对pattern有个感觉。
- Signal bar的定义:每个bar 都是潜在的signal bar,但只有看到一个setup bar,下了stop order,且你的单子成交了,那个setup bar才能成为signal bar。
- 只把阳线当成做多的signal bar,只把阴线当成做空的signal bar。
- One tick trap: 把stop order挂在potential signal bar的上面或下面几个价位,而不只是一个价位。在股票市场上,1个价位的陷阱太常见了。
- 有时候一个bar可以既是做多的setup bar也可以是做空的setup bar,你可以在两边都放stop order,一个成交后另一个变成止损单。
- Doji bar和反向trend bar作为potential signal bar有更大可能失败,虽然有时候也可以用。一个强trend bar可以给人更多信心,用更大仓位,放更大止损,所以跟着一个strong trend bar进场有更大的可能成功。
- 最好的牛市反转bar需要满足多于一个的特征:开在上个bar的收盘附近,收阳,且收得比上个bar的收盘高;下影只有1/3-1/2 bar那么长,上影很小甚至不存在;跟之前一个
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
############################################################################### | |
## ## | |
## Build and package OpenSSL static libraries for OSX/iOS ## | |
## ## | |
## This script is in the public domain. ## | |
## Creator : Laurent Etiemble ## | |
## ## | |
############################################################################### |
Summary: use good/established messaging patterns like Enterprise Integration Patterns. Don't make up your own. Don't expose transport implementation details to your application.
As much as possible, I prefer to hide Rabbit's implementation details from my application. In .Net we have a Broker abstraction that can communicate through a lot of different transports (rabbit just happens to be our preferred one). The broker allows us to expose a very simple API which is basically:
- publish
- request
- start/stop subscription
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var EventEmitter = require('events').EventEmitter, | |
_ = require('lodash'); | |
/** | |
* Creates an action functor object | |
*/ | |
exports.createAction = function() { | |
var action = new EventEmitter(), | |
eventLabel = "action", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
extension Int { | |
func bottlesOfBeer() { | |
let bottles = "\(self) bottle" + (self == 1 ? "" : "s") | |
let what = " of beer on the wall" | |
println("\(bottles + what), \(bottles) of beer.") | |
print("Take one down, pass it around, ") | |
if self == 1 { | |
println("no more bottles\(what).") |
Inspired by "Parsing CSS with Parsec".
Just quick notes and code that you can play with in REPL.
By @kachayev
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#C:\Sites\tm_wed\lib\omniauth\strategies\weibo.rb | |
# Updated at: 2014-09-04 | |
# Author: [email protected] | |
require 'omniauth-oauth2' | |
module OmniAuth | |
module Strategies | |
class Weibo < OmniAuth::Strategies::OAuth2 | |
OlderNewer