graph: graph - plot the graph into a given pdf

Description Usage Arguments Details Author(s)

View source: R/graph.R

Description

This will plot the OHLC bars & corresponding trades performed.

Usage

1
2
graph(pf, prices, file = NULL, by = "quarters", parms = NULL,
  inTrades = NULL, inPositions = NULL, overFun = NULL, ...)

Arguments

pf

- portfolio which needs to be graphed

prices

- OHLC of the shares/equity

file

- filename where pdf to be stored. Please be advised, it will overwrite if any file exists.

by

- frequncy for each page (whether monthly, weekly, quarterly) etc. e.g. monthly makes each page of pdf to contain one months data. All values accepted by endpoints function are available + halfyear. default - quarters.

inTrades

- if given only these trades are graphed. portfolio is ignored.

overFun

- overFun is a overlay function that helps to overlay graph wiht any of the indicators or values.

inpositions

- positions table for every day

Details

Green uptriangle & Green downtriangle represents the Long Entry & Long Exits. Longs are drawn above the corresponding bar.

Red uptriangle & red downtriangle represents the short Entry & short Exits. Shorts are drawn below the corresponding bar.

overFun - is a function supplied by user. This is executed in the graph function environment, so all the variables available for the graph function can be used by overFun. However caution to be exercised not to stop the function abruptly

Author(s)

Siva Sunku


sivasunku/rulesNtrades documentation built on May 29, 2019, 11 p.m.