Strategy Development User guide




Hello World Example


some data goes here skdjfsdfj sdkjf sdkjflkjfa;ldjflsdkjflskjf j lj lkdjf ljf sdf kdsjfoiweor poewkr d fof-043j sfsdkf ok fowek frwe sdj fsdjf pof-34 pweofk pwokfsdf

Example Code
def on_start
  log "Hello World!"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Hello World




Strategies Events


When a strategy is running it will receive other events too. here are the full list of events

Example Code
def on_start
  log "Hello World!"
end 

def on_candle(candle)
  log "Hello World!"
end 

def on_quote(quote)
  log "Hello World!"
end 

def on_order_udpate(order)
  log "Hello World!"
end 

def on_order_completed(order)
  log "Hello World!"
end 

def on_order_cancelled(order)
  log "Hello World!"
end 

Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Hello World
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Hello World




Getting Quotes and Candles


some data goes here skdjfsdfj sdkjf sdkjflkjfa;ldjflsdkjflskjf j lj lkdjf ljf sdf kdsjfoiweor poewkr d fof-043j sfsdkf ok fowek frwe sdj fsdjf pof-34 pweofk pwokfsdf

Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL


Adding Candles

Now lets listen to Candles

Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 

def on_candle(candle)
  log "Candle Symbol #{candle.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL





Technical Indicators

RSI Relative Strength Index
STS Stochastic Oscillator
MACD Moving Average Convergence Divergence
EMA Exponential Moving Average
SMA Moving Averages
OBV On-Balance Volume
BB bollinger bands


Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL



Candle Pattern Matching

Doji Shooting Star
Hammer Engulfing
Harami Piercing
Dark Cloud Cover Evening Star
Abandoned Baby Three Line Strike
Two Black Gapping Bullish Kicker
Bearish Kicker Three Black Crows


Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL



Placing Orders


Supported Order Types
LMT Limit Order
MKT Stochastic Oscillator
STP Moving Average Convergence Divergence
STP-LMT Exponential Moving Average
BRACKET-STP-TP Bracket Order with limit, stop loss and take profit


Placing Order Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL


Update Order Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL

Canceling Order Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL


Candle Pattern Matching

Doji Shooting Star
Hammer Engulfing
Harami Piercing
Dark Cloud Cover Evening Star
Abandoned Baby Three Line Strike
Two Black Gapping Bullish Kicker
Bearish Kicker Three Black Crows


Example Code
def on_quote(quote)
  log "Quote Symbol #{quote.symbol}"
end 
Running Results
[DaloreBackTester] 2016-21-4 18:33:12 LOG : Quote Symbol AAPL


Account Class


some data goes here skdjfsdfj sdkjf sdkjflkjfa;ldjflsdkjflskjf j lj lkdjf ljf sdf kdsjfoiweor poewkr d fof-043j sfsdkf ok fowek frwe sdj fsdjf pof-34 pweofk pwokfsdf


Attributes
Name Description
ID Number of account in databasr
name Account Name
broker Account Broker Name


Functions
Name Description
positions current positions
orders Open Orders
trades Account Broker Name
buy Account Broker Name
sell Account Broker Name




Quote Class


some data goes here skdjfsdfj sdkjf sdkjflkjfa;ldjflsdkjflskjf j lj lkdjf ljf sdf kdsjfoiweor poewkr d fof-043j sfsdkf ok fowek frwe sdj fsdjf pof-34 pweofk pwokfsdf


Attributes
Name Description
ID Number of account in databasr
name Account Name
broker Account Broker Name


Functions
Name Description
positions current positions
orders Open Orders
trades Account Broker Name
buy Account Broker Name
sell Account Broker Name




Candle Class


some data goes here skdjfsdfj sdkjf sdkjflkjfa;ldjflsdkjflskjf j lj lkdjf ljf sdf kdsjfoiweor poewkr d fof-043j sfsdkf ok fowek frwe sdj fsdjf pof-34 pweofk pwokfsdf


Attributes
Name Description
ID Number of account in databasr
name Account Name
broker Account Broker Name


Functions
Name Description
positions current positions
orders Open Orders
trades Account Broker Name
buy Account Broker Name
sell Account Broker Name