and your Code doesnt place a buylimit at all
whole Code Needs to be reWritten
try
#include <Trade\Trade.mqh> CTrade m_trade //Inside Code if(!m_trade.BuyLimit(/*Fill what Neds To beFilled*/)) printf(/*What needs to be Reported*/);
Hello everyone
I am trying to place a pending buy limit when the current price of the tick becomes below the Initial price that the trade started with. Unfortunately i am getting the following error:
2020.07.22 11:22:26.992 2020.07.01 00:00:00 failed modify #2 buy 0.1 XAUUSD sl: 0.000, tp: 0.000 -> sl: 0.000, tp: 1778.350 [Invalid stops]
Can anyone help me find out the reason ? Any help will be appreciated
Here is the code i am using : ( Most of its parts are from the documentation with minor modifications )
MQL uses BID as price close (current price)
if(current_price <= Ask) => indeed the Bid is already under Ask.
The buy limit price must be below the Bid, not below the Ask.
Buy Limit TP must be above Ask, = > NOT => Ask - 3000 * Point
Buy Limit SL must be below the Bid.
The buy limit price must be below the Bid, not below the Ask.
Buy Limit TP must be above Ask, = > NOT => Ask - 3000 * Point
Buy Limit SL must be below the Bid.
The buy limit entryprice must be below the Ask
Buy limit TP must be above the Buy limit entry price
Buy limit SL must be below the Buy limit entry price
Thank you !! this solved my problem.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone
I am trying to place a pending buy limit when the current price of the tick becomes below the Initial price that the trade started with. Unfortunately i am getting the following error:
2020.07.22 11:22:26.992 2020.07.01 00:00:00 failed modify #2 buy 0.1 XAUUSD sl: 0.000, tp: 0.000 -> sl: 0.000, tp: 1778.350 [Invalid stops]
Can anyone help me find out the reason ? Any help will be appreciated
Here is the code i am using : ( Most of its parts are from the documentation with minor modifications )