Skip to content

Setting strategy - EMA value #44

@Olideran

Description

@Olideran

Prerequisites

  • Are you running the latest version?
  • Are you reporting to the correct repository?
  • Did you search the current opened issues?

QUESTION

I'm trying to set a strategy and need to get the previous EMA value, how can I do that ? I'm not a skilled programer. I tried but it doesn't seems to work.
I´v tried this two ways.

1)
var prevema_15m = parseFloat(chart15m[chart15m.length - 3].close)
var ema8_15m = bp.indicators.ema(prevema_15m, 8)
_____________
2)
var ema8_15m = bp.indicators.ema(chart15m[chart15m.length - 3].close, 8)

If some have any idea. I'll be very grateful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions