Topic: Creating new indicator MACD Zero Lag
I'm enjoying using FSB and I'm trying to create a new indicator based on MACD Zero Lag formula that can be found here:
ZeroLAG MACD(i) = (2*EMA(Close, FP, i) - EMA(EMA(Close, FP, i), FP, i)) - (2*EMA(Close, SP, i) - EMA(EMA(Close, SP, i), SP, i));
ZeroLAG MACD Signal(i) = 2*EMA(ZeroLAG MACD(i), SigP, i) - EMA(EMA(ZeroLAG MACD(i), SigP, i), SigP, i);
EMA - exponential moving average;
Close - a price of the closing of the bar;
FP - a period of the quick moving average;
SP - a period of the slow moving average;
SigP - a period of the signal moving average;
So, I started coding, using other custom indicators. Unfortunately, I'm lacking a lot of knowledge on the FSB APIs, and I get an "array out of bound" error message when I try to use it in FSB to create strategies and don't know if there is a way to debug (step by step).
I would also have loved to have the basic MACD indicator code from FSB, but it's not available in the indicators directory.
The goal is to have very simple entry/exit rules (histogram higher or lower than 0, or signal line, etc).
Would somebody kind enough to point me to the API documentation, or do a quick check on the code attached (I'm sure my mistakes are fairly obvious to a coder accustomed to creating indicators for FSB)?