Setting up MACD and Parabolic SAR conditions
-
So i'm trying to make a bot more for learning than anything but i'm not sure how to set up some of the conditions, especially the MACD and parabolic SAR https://fxdreema.com/shared/eIY6KSJ2c
The idea is
- Check if markets above the 21 day SMA
- Wait for MACD crossover point
- Check for parabolic SAR confirmation
- (I thought about adding a stochastic, not sure?)
- Open trade
- Close when the MACD crosses back over
Again this is just for learning more than anything but if anyone has any ideas on how to make this into an actually decent strategy it'd be appreciated, for now I just want to learn how to configure the condition blocks properly
-
My recommendations:
- Use a 'Once per bar' block on top of it. Otherwise you will get tens of trades when conditions are met.
- Specify candle ID 1 in all operads of all 'condition' blocks. Now they are working on cnalde ID 0 and that means potential weird results.
- Never connect a 'close trades' structure immediately below a buy/sell now. What you will get now is that no trade will be closed if a nother one has been previously open. You'd better create a separate block tree for it headed by a 'For each trade' block.
-
Thanks i'll definitely make these changes, I was more curious about how to configure the condition blocks - i'm not sure the MACD is meant to be configured that way for crossovers and the parabolic SAR I had no idea at all; it's a default conditions block
-
No problem. Try it and let us know.