Creating my first SMA 10/30 cross strategy

 

My intention was to use 1 min data for the EUR/USD but what is shown in the chart appears to be hours or more.  I've tried to change it with no luck.  How do I change what is shown here to represent that?


vB
I've also had some luck putting the 10 period moving average on the chart as well as the 30 period moving average.  I'd like to have it auto-trade (long and short) when the 10 SMA crosses above and below 30  SMA.

 How do I set that up? 

 
tedpenner:

My intention was to use 1 min data for the EUR/USD but what is shown in the chart appears to be hours or more.  I've tried to change it with no luck.  How do I change what is shown here to represent that?


vB
I've also had some luck putting the 10 period moving average on the chart as well as the 30 period moving average.  I'd like to have it auto-trade (long and short) when the 10 SMA crosses above and below 30  SMA.

 How do I set that up? 

You must check the "Periodicity" toolbar from under the view menu. See picture:

The below code I wrote is a simple MA crossover expert that does what you wanted. Hope this helps :) Report any bugs to me.

Br, Candles


Files:
MAX.mq5  7 kb
 
Candles:

You must check the "Periodicity" toolbar from under the view menu. See picture:

The below code I wrote is a simple MA crossover expert that does what you wanted. Hope this helps :) Report any bugs to me.

Br, Candles


Oh my goodness, somebody posted!!

 

Thank you sir.  I'm not sure how to use the file but am getting better acquainted now.  Is it possible to get an email when someone responds to a post here?

 

tedpenner:

...Is it possible to get an email when someone responds to a post here?

Yes. Check the star above to add this topic to your favorites. Then go to your profile, Favorites and click on Notifications. Check updates in my Favorites and Save.
 

av, 

Thank you for your post.  I found the favorite icon and the notification area.

 candles,

I see your file which has an mq5 file extension.  I'm trying here in this video to determine how to implement it http://screencast.com/t/hSiDt0UL0K.  The video shows how I experienced it.  What am I doing wrong?  

 
tedpenner:

av, 

Thank you for your post.  I found the favorite icon and the notification area.

 candles,

I see your file which has an mq5 file extension.  I'm trying here in this video to determine how to implement it http://screencast.com/t/hSiDt0UL0K.  The video shows how I experienced it.  What am I doing wrong?  

Hi. You must copy the mq5 file to \MetaTrader 5\MQL5\Experts folder. Then open it with MetaEditor and compile it using the F7 key. This process creates the ex5 file which is now showing in the experts drop down menu of MetaTrader 5 strategy tester. Now you  can test the expert.

Br, Candles

 
Candles:

Hi. You must copy the mq5 file to \MetaTrader 5\MQL5\Experts folder. Then open it with MetaEditor and compile it using the F7 key. 

Or alternatively simply restart MT5 after you have copied the file to the   \experts\   folder  and it will compile the file when it restarts.  Then you will be able to find it in the list within the Strategy Tester.
 

Oh my goodness!  That actually works!   Thank you for uploading that candles so that I could see it in action.  The strategy itself is actually a bit of a disappointment bu the fact that you can do that is truly amazing.  I'd like to know if you have to go straight into C# programming to do this or if there is some sort of "builder" in Metatrader to help someone formulate this.  

 

I started with the Thinkorswim platform that has a builder but no back-testing.  In that platform we go through this process http://screencast.com/t/FWYaSV5hQo in order to "build" the psuedocode.  Does code builder like that exist in metatrader?  

 

Thank you again for all the encouragement.

 
I believe that there is some wizard one can use to easily 'build' EA's with no programming knowledge but being the wholistic person I am I recommend you to start learning MQL5 language.
 
Candles:
I believe that there is some wizard one can use to easily 'build' EA's with no programming knowledge but being the wholistic person I am I recommend you to start learning MQL5 language.
Do not believe everything you read ;-)
 
Candles:
I believe that there is some wizard one can use to easily 'build' EA's with no programming knowledge but being the wholistic person I am I recommend you to start learning MQL5 language.
Maybe this ?  I've not tried it yet:  MQL5 Wizard: Creating Expert Advisors without Programming
Reason: