I've put all of my automated strategy together with the exception of one aspect. I've posted for help but either I'm not explaining myself well or the sample code I get back is much more than I need (and I'm not a good enough programmer to siphon out what's needed):
I know this can't be done in the wizard, I think code is the only option
Here's the deal:
When my Fast MACD crosses over my Slow MACD, the trade is triggered BUT NOT MADE until the following confirmation:
A)MACD diff* > "x" (ticks or currency), then trade
or
B) Fast MACD crosses back below Slow MACD, trigger will be reset (no trade)
if neither A or B happens yet, wait for next bar and go from there
Eventually, one of the two options will prevail.
I just need the coding for the "if A is true, go to Action Command; if B is true, Reset Trigger. If both are false, wait for next bar".
*MACD diff doesn't know the direction of divergence and could create a scenario where both A & B are true; if that is possible I can also use a "Fast EMA > Slow EMA by value of "x" " with the two EMA's having the same setting as the MACD's.
Please help, thanks in advance.
Decoda
Comment