molanis.com/forum - Tools for MetaTrader : The place to ask about the best expert advisor builder, expert advisor downloads, and expert advisor programming

AFTER YOU REGISTER SEND US AN EMAIL TO ACTIVATE YOUR ACCOUNT - Before posting:-1- Please read the user guide -2- Try the examples -3- Search in the forum
It is currently Mon May 13, 2024 8:15 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: buy executed but not in logic?
PostPosted: Tue Nov 27, 2012 1:46 pm 
Offline

Joined: Tue Nov 20, 2012 6:21 pm
Posts: 13
Hello,
I had a buy executed on my ea but nowhere in my logic did it say to buy when mode2 shift0 < mode 2 shift1 on the Accelerator Oscillator. I'm trying to figure out what could have caused this can someone take a look at my strategy please. I have also posted a picture of chart.
Thank you.


Attachments:
MT4 EA1.png
MT4 EA1.png [ 301.14 KiB | Viewed 3205 times ]
aoacsarbuy.mol [12.02 KiB]
Downloaded 396 times
Top
 Profile  
 
 Post subject: Re: buy executed but not in logic?
PostPosted: Tue Nov 27, 2012 5:43 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
As you already alluded, the problem is not your EA. I'm guessing this issue is being caused by your custom indi(s).

You can Print test the indi's. Again, go into the indi's mq4 file. Find SetIndexBuffer(0, somevalue) if you're EA uses mode 0 for example. Whatever your somevalue actually is, add it like so in a new line of code at the end of the page:

Print("mode0: ",somevalue);

Then watch your Experts tab down at the bottom of MT4 and you can see precisely what value mode 0 is returning to your EA.

_________________
I'm not a programmer, but I play one on TV.


Top
 Profile  
 
 Post subject: Re: buy executed but not in logic?
PostPosted: Wed Nov 28, 2012 12:08 am 
Offline

Joined: Tue Nov 20, 2012 6:21 pm
Posts: 13
ok thanks for the response


Top
 Profile  
 
 Post subject: Re: buy executed but not in logic?
PostPosted: Wed Nov 28, 2012 1:10 pm 
Offline

Joined: Tue Dec 22, 2009 12:22 am
Posts: 1761
Have you seen the examples page at http://www.molanis.com/products/molanis ... rs-for-mt4 ?
It is easier to build one condition with one indicator, test it and then build on top. Also, if you trade the current bar you cannot look at the historical chart to check if the signals is right. The charts plot the value at the close and you trade at the open. Do not use the pair or time frame unless you want to create multi pair, multi timeframe eas. It is better to use the current symbol /time frame since the ea will work in any pair and in any time frame.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 posts ] 

All times are UTC - 5 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by Molanis © 2009