Problem with making simple bot
-
Hello,
I want to make a bot that can open long or short positions with the following conditions:
- EMA 5 crosses above EMA 12 and parabolic sar is under candle -> open a long position
- EMA 5 crosses below EMA 12 - > and parabolic sar is above candle -> open a short position
I also want a trailing stop so the positions close in profit.
Every time there is a crossover from the EMA it has to open a position; If the trade is open it has to close it and if there is no trade it has to open a position.
I tried to make it, but if i tested it, the bot doesn't open every cross of the EMA;
Can someone help me?
thx

-
Firstly, I strongly recommend you to specify candle ID 1 in all condition blocks. Having candle ID 0 as now can create weird results.
Your 'no trade' block is stopping ALL trades once a buy or a sell is opened. This means that if a buy is open, no sell will be opened until the buy is closed. Is that intended? If not, two different 'no trade' blocks should be used, one for buys and another one for sells.