Also, I would avdise to only work with closed bars as signals can change many times intra-bar sometimes
A little bit have used the alligator more in manual trading, but I'm familiar with the MACD. You made a good point haven't thought of it in that way. Thank you so much for the job you did on the MACD code, makes more sense now than before.
Buy = MACD(0) < iClose(NULL,0,0) && MA(15) > (0);
Sell = MACD(0) > iClose(NULL,0,0) && MA(15) < (0);
Have you any experience of using the MACD or an MA on a chart and using them to make trading decisions?
If you are trading manually, you would never compare the MACD value with a close price and you would never compare the MA to zero
Buy = (MACD(0) > (0) && iClose(NULL,0,0) > MA(15));
Sell = (MACD(0) < (0) > iClose(NULL,0,0) < MA(15)) ;would make more sense.
Also, I would avdise to only work with closed bars as signals can change many times intra-bar sometimes