Am new pls help.
-
Lots of stuff I don't understand. I have 2 main problems:
-
I build my blocks on the on timer tab and it's set to 60 seconds but when I test my strategy the trades are executed at random times instead of only executing after a candle close (using the 1M timeframe).
-
My bot buys at super weird prices. Most of my blue arrows are far above the candle or wick. Like this:

-
-
@davjack I have never used the on timer but I would use a condition set to use the one minute candles on the on tick tab, this will make the action happen with the candle time.
-
@jstap ok thanks. And any possible explanation for my second problem?
-
@davjack This is a good question, maybe just on timer, do what you can and if the problem persists create a shared link and put on here, your project can then be assessed.
-
The problem is spread at the open price for the next day. for this case, you need Spread Filter Block.
-
@davjack Please notice that no block on the 'on timer' tab will be backtested. Backtesting doesn't include time simulation.
-
@nguyenjohn But shouldn't putting a low value for slippage fix the problem? I have that and it still doesn't work.
-
I'll just post my bot here and you can tell me what I'm doing wrong cause nothing seems to be working the way i want to: 0_1629312897717_bot9.mq5
The idea is: 21,50 and 200 sma are aligned. The stochastics are oversold or have just come up from oversold and there's an engulfing candle. If the stochastics get overbought and start reversing down i close the position. The stop loss is the low of the engulfing candle.The 'once per bar' filter solved my first problem but I have lots of other ones. The bot doesn't wait for the stochastics to cross down. It just sells right after the candle it bought on. And then it stops trading completely. I also don't understand how leverage works here. I set the buy to 25% of equity and the leverage on mt5 is set to 1:1 but for some reason it takes so much that my balance went from 100 to -20000 after the first trade.
And lastly, I only tested it on BTCUSD because it doesn't take a trade on any forex. -
@davjack Can you please share the link to the project instead of the file? That would help.
-
@l-andorrà https://fxdreema.com/shared/qe9OS03gb
The leverage issue has been resolved. But I really don't understand why the slippage won't stop the bot from buying it at unreasonably high prices (testing on bitcoin so 1000 pips isn't that much). -
@davjack The only way to stop that is by adding a new condition block in which the maximum spread you want will be accepted to open a trade. Spread cannot be avoided otherwise.
-
use metatrader to build the bot to send you signals, then use a real crypto broker to manually execute upon receiving a signal. its easier that way and spread is a lot less. mt brokers for most things outside forex suck. but mt5 allows app alerts and emails.