Thanks for the good work! Reading your code is a good way to learn ;-)
I think there is a error in the call to your OpenSell function
OpenSell(m_symbol.Ask()+ExtTakeProfit,m_symbol.Bid()-ExtStopLoss);
This call gives wrong tp and sl
I think the correct call should be:
OpenSell(m_symbol.Bid()+ExtStopLoss, m_symbol.Ask()-ExtTakeProfit);
best regards
Markus
Thanks for the good work! Reading your code is a good way to learn ;-)
I think there is a error in the call to your OpenSell function
OpenSell(m_symbol.Ask()+ExtTakeProfit,m_symbol.Bid()-ExtStopLoss);
This call gives wrong tp and sl
I think the correct call should be:
OpenSell(m_symbol.Bid()+ExtStopLoss, m_symbol.Ask()-ExtTakeProfit);
best regards
Markus
There are no rules regarding the issue of TakeProfit and StopLoss. Everyone does as he likes :). Subtlety begins only with those who try to set the levels of the close to the current price.
When opening sell orders, the EA swaps TP and SL values. For example, it should be TP=20 and SL=50, but the Expert Advisor sets TP=50 and SL=20.
Thank you. Wait for the 2.001 update.
The lot volume changes regardless of the Lot parameter setting. For example, I set Lot=1, but the Expert Advisor sets 1, 2, or 3 lots.
Please provide more data: symbol, period, logs from the "Journal" and "Experts" tabs, type of your trading account (netting or hedge).
Provide more data: symbol, period, logs from "Journal" and "Experts" tabs, type of your trading account (netting or hedge).
I am sending information on testing the Expert Advisor: broker Otkritie, trading RIM7 and SiM7 futures on the Moscow Exchange, demo account, tf 1 min, period from 10 to 11 o'clock on 4.05.2017.
I am sending information on testing the Expert Advisor: broker Otkritie, trading in futures RIM7 and SiM7 on the Moscow Exchange, demo account, tf 1 min, period from 10 to 11 o'clock 4.05.2017.
I see INPUT 1.0 lot everywhere. That is, the robot enters according to the input parameter (apparently you have 1.0 lot set in the input parameters).
I recommend you to open a demo account with netting and perform this operation:
Buy 1.0, then Buy 1.0 again (in this case the position volume will be equal to 2.0 lots) and after some time close the total position. After that, look in the terminal in the "History" tab - set the "Transactions" display and look carefully in the "Direction" column.
Good day, Vladimir! The Expert Advisor is very good, but I would like to add the parameter "limit the number of open positions". It is necessary, because it makes no sense to open more positions, if the price is already far from the first open position, and the margin is not enough. Thank you!
Before each position opening (OpenBuy() and OpenSell() methods) we check whether it is possible to open a position with the specified lot InpLot. Therefore, situations of margin shortage can occur only in moments of sharp movement or deposit loading close to the maximum.
In this regard, I believe that there is no need to introduce a parameter limiting the number of open positions.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
N- candles v2:
We look for N identical candles in a row. If the found candles bull — we buy, if bear — we sell.
Author: Vladimir Karputov