Forum

IF() reading True....when it should not

void rolShortStopA() { for ( int b= OrdersTotal ()- 1 ; b>= 0 ; b--) { bool ShortA; if ( OrderSelect (b,SELECT_BY_POS,MODE_TRADES) && OrderMagicNumber()==Magic && OrderType()==OP_SELL && Ask<OrderOpenPrice()-( 0.5 *stopShort)

Virtual Server- EAs removed and initialized...without asking

Hi My EAs are held on a MQL provided virtual server . Checked the Journals log for both the Terminal and Experts; this morning they were all synchronized again. But, i did not ask for this to happen :( Can't see anything in the Journals log to explain to me why this happened. Any ideas how I can

MarketInfo() producing 0.0 for bid price

Hi All I'm running the below on EURNZD. While on this pair, I'm trying to get the bid price for another currency pair ; GBPNZD (string newcurrency in my EA) The 1st Print shows me I'm successfully generating GBPNZD, but when I plug this into MarketInfo to get the Bid price of GBPNZD, it is only

Tester results, incorrect maths?

Hi Please can someone have a look at the attached results from Tester please on the screenshot? The profit / losses on the trades don't quite make sense to me. If look at trade 1 for example- lots is 0.12 and it takes profit 86.4 pips away from entry. So, that should be a profit of 110 right? The

why is this function called when the bool is false?

Hi This has probably got the better of me for a good 2 days now. In the attached code when I run it in Tester I should only be able to get "Short B called" to print in the Journals tab when the bool for it (rolShortB) is set to True. But, I can't see where it is getting switched to True?! Please can

OrderModify Error 0

void rolLongStopA() { for ( int b= OrdersTotal ()- 1 ; b>= 0 ; b--) { bool LongA; if ( OrderSelect (b,SELECT_BY_POS,MODE_TRADES)) if (OrderMagicNumber()==Magic) if (OrderType()==OP_BUY) if

Testing- OnTick() & OnTimer()

Hi I've attached screenshots of my Journal results from running this EA. #property strict // Global variables. EACH EA needs a different unique Magic Number // extern means it can be changed in optimisation //+------------------------------------------------------------------+ //|Initialisation is