example

package
v0.14.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicEma

func BasicEma() techan.Indicator

BasicEma is an example of how to create a basic Exponential moving average indicator based on the close prices of a timeseries from your exchange of choice.

Example
fmt.Println(BasicEma().Calculate(3).FormattedString(2))
Output:
102.50

func StrategyExample

func StrategyExample()

StrategyExample shows how to create a simple trading strategy. In this example, a position should be opened if the price moves above 30, and the position should be closed if a position moves below 30.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL