Please tell me how to write the KDJ and MACD indicator strategies for digital currencies.

Author: Howard0756, Created: 2021-09-04 17:56:06, Updated: 2021-09-04 17:57:36

Cryptocurrency trading, want to write a 4-hour or dayline-level KDJ gold fork buy, die fork sell strategy

See the API documentation:

function main(){ var records = exchange.GetRecords(PERIOD_M15) var kdj = TA.KDJ(records, 9, 3, 3) Log(“k:”, kdj[0], “d:”, kdj[1], “j:”, kdj[2]) }

The output is a bunch of information, without the information of a golden fork or a dead fork, how do you judge the signal?

I'm trying to write a strategy for buying and selling KDJ gold forks at the 4-hour or dayline level.

For example, in my strategy, the circular judgment, when the gold fork is monitored, when the gold fork is bought, when the dead fork is monitored, when the gold fork is sold.


More

DeanDeanWrite a flow over the output information, crossing the previous moment of difference times this moment of difference less than 0.

Howard0756Can you give me an example?