My new Universal EA, come check it out.

 

I am an amateur coder and I am trying to make a good EA that is easy to use.

I'm trying to give back to the community since I have learned so much from this website and want to continue to learn.


I have created an EA that is very adjustable and easy to use. If you wish to download it the links are

<links removed by moderator>


Also I made some youtube tutorials on how to use them here

https://www.youtube.com/watch?v=ZKRzSfHMjpQ


Good luck and happy trading!


Patrick Cofflin,

p.a.cofflin@gmail.com

 

Also you can download the EA from the attached file.


Good luck and happy trading!

Files:
 
pacofflin:

Also you can download the EA from the attached file.


Good luck and happy trading!


You should read these articles: What are Function return values ? How do I use them ? & Loops and Closing or Deleting Orders
 

Thanks for the inputs Raptor, I am a new coder and learned from youtube videos and other EAs. My knowledge of loops is limited. I read your links and I learned some new things.

Is there some way I could make my loops better? Or maybe a more simple way to write the code?


You see I struggled a lot with the trade limiter because I tried using a time based loop and it just wouldn't work. My original code was this


{for(int i = 0 ; i < OrdersTotal() ; i++ )
{if( OrderSelect( i, SELECT_BY_POS, MODE_TRADES ) == false ) break;
if((OrderOpenTime()+TradeTimer)<TimeCurrent())
{if( OrderType() == OP_BUY)
Buy=false;
else if( OrderType() == OP_BUYSTOP)
Buy=true;}}}


Where you could adjust the variable TradeTimer to however many seconds you wanted the trading window to be open.

I'm not sure why it wouldn't work so I switched it to a Stochastic based trade limiter which worked like a charm.

Thanks for the help.

 

So I should change


for(int i = 0 ; i < OrdersTotal() ; i++ )

to

for(int i = 0 ; i < OrdersTotal() - 1 ; i++ ) 
 

No it should be

for(int i =OrdersTotal() - 1 ; i >=0 ; i++ ) 
 
pacofflin:
So I should change for(int i = 0 ; i < OrdersTotal() ; i++ ) to for(int i = 0 ; i < OrdersTotal() - 1 ; i++ ) ?


No read What are Function return values ? How do I use them ? & Loops and Closing or Deleting Orders

looking is not enough read it for(int i = 0 ; i < OrdersTotal() - 1 ; i++ ) is not correct

also select right Symbol() and right MagicNumber

also why do you need every tick so many loops checking your trades

 
Is
for(int i =OrdersTotal() - 1 ; i >=0 ; i++ )

or


for(int i =OrdersTotal() - 1 ; i >=0 ; i--)

better for closing a loop?

 
pacofflin: No it should be for(int i =OrdersTotal() - 1 ; i >=0 ; i++ )
Correct and please:

Play video
Please edit your post.
For large amounts of code, attach it.
 

Well deVries I did read it but I'm still trying to figure out where I messed up at.


My loops contain bool functions so each one has a different function and can be turned on and off using true or false values.


I wanted to add many different functions to give people the option to choose how they wanted to close their trades so that they could customize the EA to their own trading strategy. I created an EA that has many different variables and inputs so that anyone could adjust the numbers. The EA is a template for any system that you can think of that uses the indicators provided. I am trying to make it better so that people who use it don't have to mess with the code at all.

 
WHRoeder:
Correct and please:

Play video
Please edit your post.
For large amounts of code, attach it.

Thanks for the info WHRoeder I was wondering how to add the code correctly.
Reason: