02-04-2018, 02:07 PM
Ability to plot data from a/the strategy.
Use something similar to TradingView's pinescript, pseudo code:
Params
- data
- color (named/hex)
- line width (in px)
- overlay (overlay the data or add it under the graph)
Use something similar to TradingView's pinescript, pseudo code:
Code:
var strat = {
init: function()
{
this.name = 'Hello world';
this.addTulipIndicator('maSlow', 'tema', { optInTimePeriod: this.settings.long });
this.addTulipIndicator('maFast', 'sma', { optInTimePeriod: this.settings.short });
this.addTulipIndicator('myRSI', 'rsi', { optInTimePeriod: this.settings.RSI });
this.plot(
{ data: 'maSlow', color: 'black', width: 2, overlay: true },
{ data: 'maFast', color: '#f00', width: 1, overlay: true },
{ data: 'myRSI', overlay: false }
);
}
};
Params
- data
- color (named/hex)
- line width (in px)
- overlay (overlay the data or add it under the graph)