You compiled the EA succesfully, but is that file saved to your metatrader==> experts directory
Check it with your metaeditor where your program is click on file and save as Look if it is in the right directory
If you had made earlier a save to another directory outside the directory of your MT4 platform and you compile then Then this compiled ex4 will be also in that directory
I created a blank mq4 file in MetaEditor, copied and pasted the OP's code in, saved as . . . the same file name as the OP had used, and then compiled. I then copied the mq4 and ex4 files to my MetaTrader installation directory/experts folder . . . I restarted MT4 and attached the expert to my chart . . . no issues.
Wow, that's above and beyond ...
well done :-)
//---- if (Bought_Last == false && Total==0) { // Bought_Last = true; if buy fails bought last is true think it has only be true if buy succeed // Sold_Last = false; int ticket=OrderSend(Symb,OP_BUY,1,Ask,3*points,Ask-Stop_Distance*pips,Ask+TP_Distance*pips," ",MagicNumber); if(ticket>0) { OrderSelect(ticket,SELECT_BY_TICKET); Print("Order Send Successful " + ticket + " Long from " + OrderOpenPrice()); Bought_Last = true; //place here Sold_Last = false; // Total++; //Also Total is changed } else { Print("Order Send Failed, Error " + GetLastError()); } return(0); }
Symb & Time_0 has no function
Suggestion bought last/ sold last/ total/
This can also be done for sell trades
I get the message "Cannot open file 'C:\Program Files\GFT_MT4 Powered by BT\experts\90% Wins.ex4' on the EURUSD,H4" in my journal.
I recently programmed a very basic EA to test the relationship between risk/reward ratio and winning percentage (see below).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I recently programmed a very basic EA to test the relationship between risk/reward ratio and winning percentage (see below). The EA successfully compiles, but when I go to my MT4 terminal, the icon for the EA is greyed out and when I try to add it to a chart, I get the message "Cannot open file 'C:\Program Files\GFT_MT4 Powered by BT\experts\90% Wins.ex4' on the EURUSD,H4" in my journal.
I've already looked into this issue and the consensus is that a greyed out EA should work, but means there is no .mq4 file to go with the .ex4 file. Obviously in my case, this makes no sense, as I personally programmed the EA...and it doesn't load on the chart.
Can someone help me?