Im using the below text to find a high on the macd but this way of doing this task is quite cpu intestive, Could any rewrite this to make it less intesive, the purpose of this it to find a bump in the macd
if ( tracker =="Go" &&
vSMA12.getValue(MACDStudy.MACD) < -0.2 &&
vSMA12.getValue(MACDStudy.MACD,-6) > vSMA12.getValue(MACDStudy.MACD,-5) &&
vSMA12.getValue(MACDStudy.MACD,-5) > vSMA12.getValue(MACDStudy.MACD,-4) &&
vSMA12.getValue(MACDStudy.MACD,-4) > vSMA12.getValue(MACDStudy.MACD,-3) &&
vSMA12.getValue(MACDStudy.MACD,-1) < vSMA12.getValue(MACDStudy.MACD) &&
vSMA12.getValue(MACDStudy.MACD,-2) < vSMA12.getValue(MACDStudy.MACD,-1) &&
vSMA12.getValue(MACDStudy.MACD,-3) < vSMA12.getValue(MACDStudy.MACD,-2))
if ( tracker =="Go" &&
vSMA12.getValue(MACDStudy.MACD) < -0.2 &&
vSMA12.getValue(MACDStudy.MACD,-6) > vSMA12.getValue(MACDStudy.MACD,-5) &&
vSMA12.getValue(MACDStudy.MACD,-5) > vSMA12.getValue(MACDStudy.MACD,-4) &&
vSMA12.getValue(MACDStudy.MACD,-4) > vSMA12.getValue(MACDStudy.MACD,-3) &&
vSMA12.getValue(MACDStudy.MACD,-1) < vSMA12.getValue(MACDStudy.MACD) &&
vSMA12.getValue(MACDStudy.MACD,-2) < vSMA12.getValue(MACDStudy.MACD,-1) &&
vSMA12.getValue(MACDStudy.MACD,-3) < vSMA12.getValue(MACDStudy.MACD,-2))
Comment