Class: SQA::Strategy::MP

Inherits:
Object
  • Object
show all
Extended by:
Common
Defined in:
lib/sqa/strategy/mp.rb

Class Method Summary collapse

Methods included from Common

desc, trade_against

Class Method Details

.trade(vector) ⇒ Object



8
9
10
11
12
13
14
15
16
17
18
# File 'lib/sqa/strategy/mp.rb', line 8

def self.trade(vector)
  mp = vector.market_profile || :mixed

  if :resistance == mp
    :sell
  elsif :support == mp
    :buy
  else
    :hold
  end
end