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 Sat May 11, 2024 3:45 am

All times are UTC - 5 hours




Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Sun Sep 23, 2012 11:15 pm 
Offline

Joined: Thu Oct 27, 2011 12:41 pm
Posts: 59
Hi there, first and foremost I would like to say again this is such a wonderful software. Softwares like this makes the world an easier place to live in (and trade!!!!) Great job you guys!

OK - Here are my issues -

I have 7 good EAs I use for trading. I trade in EurUsd M30 only. I normally open seven EurUsd Charts and attach each EA to each chart but recently it has become a hassle to that whenever I want to trade. For each EA the Max No. of lots is 1 only.

So to cut out the hassle what I did is I combined all the EA into one file and it becomes a single EA. In this way I will only attach it to a single EurUsd chart, no need to open 7
charts. Please note that each EA WORKS DIFFERENTLY FROM EACH OTHER THUS ENTERS TRADES AT DIFFERENT LEVELS.

I set the Max No. Of lots to 7, one for each EA I thought.

What happens here is that when the Trading Conditions are met for any EA it enters a trade 7 times and leaves no chance for other EAs to act when their conditions are met (say, 1 hour later and that all open positions are still open).

QUESTION.
- How do I make it enter just one trade even though the Max No Of Lots is set at 7?.
- Max No of Lots 7, but set the Max No Of Retries to 1 ?
- If I open a second trading terminal, say a client's acount, if my personsl account already enters 7 trades (irregardless how) will the same EA attached to the same chart but in an entirely different account trade, or will it not trade? (all the 7 available trade position are taken up in the first account).


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Mon Sep 24, 2012 1:44 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
Hey there, I agree with your first point for sure.

I think the simple solution would be to continue running 7 EA's, each on its own chart, and set Max Number of Positons to 1 in each EA input tab. This allows SB's code to manage each pair symbol separately without having to do any coding.

Regarding one big EA, if I follow you, you want one trade for each set of trading conditions (from each old EA respectively) for a total of 7 trades using the new EA. I think Max Lots, or Max Number of Positions for that matter, are magic number related--counting lots or positions will not help you limit your single EA trading conditions without editing your mql code.

There was a recent request posted regarding "one trade per day," and I think your coding would be similar. Note, you need SB Pro for this. You would have to declare 7 new global variables, say cond_1_trade, cond_2_trade, etc. and assign each a default value, say 0.

Within each set of trading conditions, you would add a condition, say cond_1_trade==0.

Within the operator(s) following each set of trading conditions, you would add cond_1_trade=1.

So when the first trading condition enters a trade, it also reassigns a value of 1 to its own variable, negating further trading under this condition. Do this whole procedure 7 times and you should have mutually exclusive trading conditions--remember, each variable name must be unique. If your EA buys and sells, you'll probably do this more like 14 times.

The real problem is getting the values to reset back to 0 at order closure. The current version of SB cannot dynamically manage orders on an individual basis, so the code to edit is not present. You would have to build this from scratch by uniquely identifying each order at entry (via magic number, etc.); and then selecting each order individually via OrderSelect; and finally closing the order via OrderClose. If you choose this route, you can omit the variables I mentioned previously and use OrderSelect to limit your trading conditions as well. Of course, the crude but easy way out here is to simply let SB close everything at once at some condition and restart the EA manually.

Personally, I would opt to run 7 EA's! :lol:

And regarding 2 accounts, I cannot log into more than one account simultaneously on one MT4 installation. So I would have to say that unintended communication between EA's running on separate installations of MT4 would be extremely unlikely.

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


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Sat Sep 29, 2012 4:17 am 
Offline

Joined: Thu Oct 27, 2011 12:41 pm
Posts: 59
hi there,

Wow I think you have gone a lot further than me where Molanis SB is concerned. I don't understand a thing what you've just wrote.

I wish there is another way to do this.

So you will settle with opening up 7 charts uh?

Thanks.


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Thu Oct 04, 2012 9:10 am 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
Yes, I would settle for 7 charts--mostly because I'm a newb when it comes to coding. In fact, I rarely use my order opening EA's to manage those same orders. I use Hopwood's MPTM for jumping stops, ATR stops, etc. I'm hoping similar features will appear in the next version of SB.

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


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Mon Oct 08, 2012 8:24 pm 
Offline

Joined: Thu Oct 27, 2011 12:41 pm
Posts: 59
Hey yo RJo,

Its Tuesday 9am am in my car with laptop and as I am typing this I have just attached seven EAs each with a MaxNoOfPosition1 on seven separate EurUsd Charts, one account, but with a difference - I changed their magic numbers - I'll let you know if this works.


One of the EA is repeated twice with different magic numbers again and each with different working hours - see if this works too I'll let you know. So altogether 9 EAs, 6 different, 3 identical with different working hours non overlapping.


Are you working for Molanis? Related? hehee..


How do you use an MQL block. I have had Molanis SB for almost two years already and have produced workable EAs but I have neglected MQL blocks. :cry:


How do you use them? Any pdf on them?


tks bro.


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Mon Oct 08, 2012 10:22 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
[quote="kitz328"]
Its Tuesday 9am am in my car with laptop and as I am typing this I have just attached seven EAs each with a MaxNoOfPosition1 on seven separate EurUsd Charts, one account, but with a difference - I changed their magic numbers - I'll let you know if this works.

One of the EA is repeated twice with different magic numbers again and each with different working hours - see if this works too I'll let you know. So altogether 9 EAs, 6 different, 3 identical with different working hours non overlapping.[quote]

Yes, you must change the magic numbers in order to run multiple EA's on multiple charts of one pair symbol. I ASS-U-ME-d you were doing this since post 1. My mistake.

[quote="kitz328"]
Are you working for Molanis? Related? hehee..[quote]

:evil: This is not the first time this accusation has been made! :lol: That reminds me... Go to a coders for hire forum and show off your Molanis EA--they'll love it.

[quote="kitz328"]
How do you use an MQL block. I have had Molanis SB for almost two years already and have produced workable EAs but I have neglected MQL blocks. :cry:

How do you use them? Any pdf on them?
[quote]

I've tinkered with MQL blocks but never actually generated one. Per the admin, just type standard mql code into the block to build conditions using iCustom, iMA, >, etc.

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


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Mon Oct 08, 2012 10:47 pm 
Offline

Joined: Thu Oct 27, 2011 12:41 pm
Posts: 59
Coders for Hire Forum?

They are Molanisians?


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Wed Oct 10, 2012 1:25 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
Nooooooo... I was playing a trick on you. :twisted: First, you would be accused of being an ad man, and then you will get unsolicited and conflicting diagnoses of your code. Amazingly enough, throughout all of this, we are all punching out functional EA's left and right.

I rationalize it this way... The bread and butter of any coder for hire is probably your average trader needing a $300 EA--nothing too complex. This trader is probably new. Failure rates published by each dealer as part of NFA compliance show 75% to 80% on nondiscretionary accounts are in the red. These probably aren't folks who are willing to pay $100 for one EA, but who will pay more than that for something that enables them to stamp out idea after idea with the goal of producing a winner. Sound familiar? :o There must be a bazillion mql coders for hire out there and only a handful of quality mql autocoders. Put yourself in their shoes.

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


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Thu Oct 11, 2012 12:25 am 
Offline

Joined: Thu Oct 27, 2011 12:41 pm
Posts: 59
Hi RJo,

So you've been around the block uh? where they sell and buy EAs .....


I need your opinion.

I got two guys I'm seeing soon because they saw my YouTube channel and they want to buy my EAs.

I am talking about seven EAs altogether. They are for EurUsd only. They BUY only, they do not enter shorts. Combined they trade around 350 times a year.

Lease or sell I do not know.
What about pricing.
The EA sits in their laptop or mine.
What if they want to make setting alterations.
How would you suggest profit sharing.
How would you suggest monthly payment if on lease.


If I sell and then forget about it thats no good. I should have some sort of after sales contact.


Any ideas?


Top
 Profile  
 
 Post subject: Re: How to maintain Max No Of Position at 1, seven EAs in one.
PostPosted: Thu Oct 11, 2012 3:41 pm 
Offline

Joined: Sun Jun 19, 2011 9:38 pm
Posts: 270
Well you asked for opinion, so to all eyes on this here's some pure opinion:

Lease or sell I do not know.
For starters if you're selling, you would have to get paid in full up front. Once the intellectual propery is out the door, it's impossible to reel back in. Unless a large some of money, say for exclusive rights, is on the line; I would forget selling. Non disclosure agreements, etc. are only as good as the integrity of the counter party. Unless you have the resources for complete due diligence i.e., credit reports, etc., you will wind up the loser. Leasing is messy for similar reasons, only now you have the burden of collecting less money a little bit at a time. Keep in mind that the law will not help you when you're EA is renamed and resold or worse--a share-happy clown like me gets a hold of it. DLL's, encryption, IP logging, MAC address authentication.. there's a way around everything if joe hacker keeps at it. Selling and leasing are out.

What about pricing.
I'm thinking subscriptions are your best option. Really the only way to go is a subscription based signal service. Text, email, and web based. About $25 per month should do for an unlimited number of subscribers. This is NOT a lease. This is about what I paid early on for a service that doubled my account in 6 months, and then promptly lost 70% of my account equity. Throw in an up front registration fee from $50 to $500 and someone somewhere will eventually pay it. Be careful only to make claims that you can substantiate. It will take only a very small number subscribers suffering a very small number of consecutive losses to jump online and vote you down. Perhaps more appropriately, you should be asking about minimum capital requirements. Blow someone's last $100 in subsistence benefits and they just might track YOUR IP address.

The EA sits in their laptop or mine.
Yours (see above).

What if they want to make setting alterations.
Impossible—you retain the EA exclusively.

How would you suggest profit sharing.
What?! I’ll pretend you didn’t write this.

How would you suggest monthly payment if on lease.
Not applicable (see above).

How’s that for a long post?

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


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 17 posts ]  Go to page 1, 2  Next

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