if you can post the codes with the src button. it makes reading your codes easier.
void OnTick(bool& posopen, int& lasttrade)
Looks like them parameters isn't workin too well
- It would be easier if you said us what is the problem with this EA.
- As tbittle13 said, there is no parameter for OnTick() event handler.
- I suggest you also to use indentation correctly, it's easier to read to code, and less error prone.
I edited your first post and removed the second one.
There seems to be a lot wrong with your code. For example you can replace extern with input to make variable changeable by user. I suggest you read Automated Trading Language Documentation It will help you here.
Good luck!
//SELLEURUSD void SellExecute(double RiskWill) { double totallots = CalcLotsVolume(RiskWill); trade.PositionOpen("EURUSD",ORDER_TYPE_BUY,totallots,SymbolInfoDouble("EURUSD",SYMBOL_BID),0,0); }
ORDER_TYPE_BUY
ORDER_TYPE_SELL
if (posopen=false){Is that correct?
Icarus:
Is that correct?
Is that correct?
Certainly not, it should be :
if (posopen==false){
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
Trying to get this EA to work... new to MQL5. Basically, I'm trading on simple MA crossovers based on risk to account balance (USDEUR on 1 HR time frame). Any help is appreciated.... thanks!