You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Two Trend Line.mq5
version "1.001"
Stop Loss, Take Profit and Trailing are disabled. When opening a position, a comment ("UP" or "DOWN") is added, to understand which line has triggered the signal.
OnTick will show a critical error when going through any line.
A mistake somewhere in the choice of money management. When we switch from interest to fixed lot. When interest is left, positions are opened. Apparently I'm just in a hurry. Another thing: positions open with a lag.
Of course, maybe that's how it's supposed to be for now. I'm not racing the horses. I'm just coordinating the course of events.
I'm sorry. if I should have reported the Bid and Ask earlier. The trades should come from them, not the candlesticks.
In the first case, the bot waited for the next candle and opened a Sell immediately with it. But it should have been done as soon as Ask has crossed the Down line from above downwards. The same story with the UP line. When making transactions, the bot should start from the current market price (Ask and Bid), but not from the candlesticks.
The algorithm is as follows: If Ask < the Up or Down line, then SELL. If Bid > the Up or Down line, then BUY. Bid and Ask are not meant in terms of trading, but in terms of condition. Both indicators must cross the line. As soon as it happened, a trade is executed. Opening andclosing of positions should be based on the current price, and not on the OPN and CLSE candlesticks.
Two Trend Line.mq5
version "1.002"
Fixed working with risk when setting the lot.
Remind you: Checking the crossover works ONLY at the moment when a new bar is born. Reacting instantly to price crossing is quite dangerous and I don't see the logic in it.
Added:
pay attention to the"Work Time Frame" parameter - this is the one that sets the timeframe at which the new bar is caught. And already on the new bar of the "Work Time Frame" timeframe checks the crossing of price on H1. That is, if the"Work Time Frame" is set to M1, it means that crossing of our lines by the H1 bar will be checked once a minute.
Two Trend Line.mq5
version "1.002"
Fixed working with risk when setting the lot.
Remind you: Checking the crossover works ONLY at the moment when a new bar is born. Reacting instantly to price crossing is quite dangerous and I don't see the logic in it.
Added:
pay attention to the"Work Time Frame" parameter - this is the one that sets the timeframe at which the new bar is caught. And already on the new bar of the "Work Time Frame" timeframe checks the crossing of price on H1. That is, if the"Work Time Frame" is set to M1, it means that crossing of our lines by the H1 bar will be checked once a minute.
Problem. UP line is crossed, but SELL trade is hanging on. In the settings I set M1
Full set file with settings please. Template of the chart in the plotted lines. Dates from and to. Symbol and timeframe. Generally two tabs (Natstrokes and Parameters) from the Tester window.
Full set file with settings please. Chart template with lines drawn. Dates from and to. Symbol and timeframe. Generally two tabs (Natstrokes and Parameters) from the Tester window.
There is no problem with lines. Put them anywhere on the chart and they are automatically put where they should be on the new day. It's with them that everything is clear, all right. The problem is in the lag of working with orders.
I have not changed anything in settings other than timeframe and lot. I have called the lines as they should be. Everything is OK with lines. They fit on the chart like clockwork.
Full set file with settings please. Chart template with lines drawn. Dates from and to. Symbol and timeframe. Generally two tabs (Natstrokes and Parameters) from the Tester window.
I will only be able to record a video in the evening, if not decided by that time. I will directly show the points where the bot misses.