1. where TradeContext.mq4 ?
2. start code not full code - has "...", this make hard to realize ur compile error, not c how help if not have 100% code u have that produce compile error?
fbj wrote >>
1. where TradeContext.mq4 ?
2. start code not full code - has "...", this make hard to realize ur compile error, not c how help if not have 100% code u have that produce compile error?
Gidday fbj
Thanks for the response
I don't know weather the start code is complete or not as I'm not a coder but I'm trying to learn very slowly
please find attached the TradeContext.mq4
Files:
tradecontext.mq4
10 kb

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have attached this template to my EA but after compiling I have an error '.' - unexpected token
this is one thing I have not seen before as I am not good at coding could someone please point me on the right direction as to what I need to do with this template to get it to work.
Any help would be great
#include <TradeContext.mq4>
int start()
{
// check whether the market should be entered now
...
// calculate the StopLoss and TakeProfit levels, and the lot size
...
// wait until the trade context is free and then occupy it (if an error occurs,
// leave it)
if(TradeIsBusy() < 0)
return(-1);
// refresh the market info
RefreshRates();
// recalculate the levels of StopLoss and TakeProfit
...
// open a position
if(OrderSend(...) < 0)
{
Alert("Error opening position # ", GetLastError());
}
// set the trade context free
TradeIsNotBusy();
return(0);
}