Learn R Programming

RTL (version 1.3.0)

tradeStrategySMA: Sample Quantitative Trading strategy

Description

Moving average crossover strategy

Usage

tradeStrategySMA(data = RTL::uso, par1value = 50, par2value = 200)

Value

Dataframe with indicators, signals, trades and profit and loss.

Arguments

data

Dataframe of OHLC data e.g. RTL::uso

par1value

Value of first parameter e.g. short MA

par2value

Value of second parameter e.g. long MA

Author

Philippe Cote

Examples

Run this code
tradeStrategySMA(data = RTL::uso, par1value = 50, par2value = 200)

Run the code above in your browser using DataLab