If I set PT to be 20 pips, why does the platform PT at much less than that (eg: 8 pips in some cases)?
No SL was used. Major pair traded (eurusd) so no issues with spread (spread fixed to 2 pips). Also roll over allowed, so no time stops or anything like that.
What is PT?
Should I assume you mean TakeProfit (TP)?
If so, can you post the code and I'll have a look?
What is PT?
Should I assume you mean TakeProfit (TP)?
If so, can you post the code and I'll have a look?
Hey topgun! :)
I figured it out, it was a trade I closed myself before TP, back on track now :)
Man the comments you posted yesterday on 'newbie adventures' board, super informative, but it took me a few hours just to decypher what you meant. An image comes to mind of the stories when a student comes to a Zen master, the zen master says something so simple and clear but the student is left baffled at what the meaning was. But I still managed to find an CalculateOrders chunk of code, and a good friend of mine posted me also same code this morning.
int CalculateNumberOfOrders(string Symbol)
{
int long=0,short=0;
for(int i=0;i<OrdersTotal();i++) //note to me: ***refresh 'for' loop characteristics
{
if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)==false)break;
if(OrderType()==OP_BUY)long++;
if(OrderType()==OP_SELL)short++;
{
//---return orders Volume
if(long>0)return(long);
if(short>0)return(short);
{
//------------ (next i want to see how this is integrated into rest of code) check hans & other guy's codes
I'l try and see how I can integrate this into my code as of yesterday.
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
If I set PT to be 20 pips, why does the platform PT at much less than that (eg: 8 pips in some cases)?
No SL was used. Major pair traded (eurusd) so no issues with spread (spread fixed to 2 pips). Also roll over allowed, so no time stops or anything like that.