Expert Starts or end another expert

 
Hi,
Can one expert advisor can activate another expert advisor.
Can an expert advisor deinit itself (make the expert deactivated by removing it form the chart only).

Thanks.
cplayer
 
1. No
2. No
 
cplayer

cplayer:

Can one expert advisor can activate another expert advisor.
You could, I guess, construct an EA that is a shell which calls other modules that contain your different EAs. the calls and or determination on which to activate would have to be within the shell and divert control to the correct module. This would be one EA with one init() and deinit() functions with two or more different possible outcomes (systems) or (functions). Here I mean that one could be your system and when your system is dorment then a function that analysis market conditions could be run to determine if entries are to be made the following day, as an example. Many defferent modules could be stringed together in this fastion, with different run times.


Can an expert advisor deinit itself (make the expert deactivated by removing it form the chart only).
You can not deinit() an EA from within itself. As close as you can come, is to exit the EA prematurely with a return statement on given condition, and have it continue when that condition no longer exist or a different condition exists. As in stoping at 18:00 GMT and restarting at 06:00 GMT or any other conditions for that matter. This will not end the EA it will still be active just dorment.


Hope this helps

The CockeyedCowboy
 
The CockeyedCowboy

Thanks for your reply.
I appreciate your skills (hans expert).

cplayer
 
Cplayer

The coding style in that EA (gamma) created a lot of inquires. No one has yet to come close to attempted some of the things that I have accomplished with MQ4. I don't think that they are ready for such or a least traders don't have the patients to construct their EAs into a complete trade system, a true EXPERT SYSTEM. That is why some don't beleive that experts are reliable. I have a system still on MQII v.3 that I trade called 'The Rubixs Qube' that would totally amaze you. May be this forum will be different.




cplayer:
The CockeyedCowboy

Thanks for your reply.
I appreciate your skills (hans expert).

cplayer
 
hi Cowboy,

I don't know what you've accomplished using mq4. I'll tell you what I accomplished and you'll tell me your opinion.

I build an indicator for testing a certain strategy, including:
1. visual cues for buy/sell/tp/sl/etc...
2. ability to work simultaneously in realtime (using bid/ask ticks) and historical bars, either close price or market price (using heuristics when bars are crossing several levels)
3. realtime calculation and on-screen/on-object display of all major statistics, i.e., w/l, p/l, enters/exits per type and level, etc...
4. outputing bar-by-bar pips-equity-pnl to an Equity File.
5. importing and reconstructing bars from market tick files and simulating trading in realtime through the indicator
6. when working in realtime, the indicator sends signals to a pending EA to make actual trade calls through a file-managed-queue
7. the indicator reads own history of trades and resimulate it on screen
8. a separate window Equity indicator reads all Equity files from the given group (strategy) and plots them in the required resolution, including an average portfolio equity constructed from all the strategies that share the same group.
9. the trading alerts with human voice, and using voice recognition .dll is also open to collecting vocal manual-overrides

Now, I don't know what you've done, but I know nobody got near this...

Good Trading,
m
 
mishka:
hi Cowboy,

I don't know what you've accomplished using mq4. I'll tell you what I accomplished and you'll tell me your opinion.

I build an indicator for testing a certain strategy, including:
1. visual cues for buy/sell/tp/sl/etc...
2. ability to work simultaneously in realtime (using bid/ask ticks) and historical bars, either close price or market price (using heuristics when bars are crossing several levels)
3. realtime calculation and on-screen/on-object display of all major statistics, i.e., w/l, p/l, enters/exits per type and level, etc...
4. outputing bar-by-bar pips-equity-pnl to an Equity File.
5. importing and reconstructing bars from market tick files and simulating trading in realtime through the indicator
6. when working in realtime, the indicator sends signals to a pending EA to make actual trade calls through a file-managed-queue
7. the indicator reads own history of trades and resimulate it on screen
8. a separate window Equity indicator reads all Equity files from the given group (strategy) and plots them in the required resolution, including an average portfolio equity constructed from all the strategies that share the same group.
9. the trading alerts with human voice, and using voice recognition .dll is also open to collecting vocal manual-overrides

Now, I don't know what you've done, but I know nobody got near this...

Good Trading,
m
I have one question, Why did you utilize an indicator file to do this as coding all this would of been easier and more direct in an expert file?

There is alot more that can be done, this is part of an ea that I am working on currently. Take a look at the File Linkage Section. This is only a few of the modules that I have available.

The CockeyedCowboy


/*»»» MetaQuote [ MQ 4 ] »»»»»»»»»»»»»»»»»»»»»»»»«««««««««««««««««««««««««««««««««««««««««««««««««««« //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» IDENTIFICATION DIVISION ««««««««««««««««««««««««««««««««««««««« //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»«««««««««««««««««««««««««««««««««««««««««««««««««« Program Name ~~~ The Russian Roulette System Symbol ~~~ TRR Author ~~~ Keit Thomas Largo Writen For ~~~ WinSoft Technology ® Module Type ~~~ Expert Advisor Date Writen ~~~ 02/18/2006 Last UpDate ~~~ n/a Version Number ~~~ 1.00.01 Program Language ~~~ MetaQuote ® MQL v4.00 Script Language ~~~ Lore Language ® v2.60 Security Level ~~~ Signature Required Documentation ~~~ see Documentation Division // ««« COPYRIGHT NOTICE: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» This program is the unpublished works of the author and a part of his private library. It is protected as such under the United States Copyright laws. No part of this program may be used or re-produced for any purpose, in any form or by any means, or stored in a database or retrieval system. Making copies and or use of this program without the prior writen permission of the author, is strictly prohibited. No offers are being made to the public for distribution, sale, re-sale or usage. WinSoft Technology is a registed TradeName of the author and doesnot constitute a transfer. ~~~ Keit Thomas Largo ~~~ //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»«««««««««««««««««««««««««««««««««««««««««««««««««««« //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» ENVIRONMENT DIVISION ««««««««««««««««««««««««««««««««««««««« //»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»««««««««««««««««««««««««««««««««««««««««««««««««««*/ // ««« FILE LINKAGE SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» #include <Append/Lore Language v2.60> #include <Append/MetaQuote/Procedural Component Module> #include <Append/MetaQuote/MessageCenter Module> #include <Append/MetaQuote/ErrorHandler Module> #include <Append/MetaQuote/BackOffice Module> #include <Append/MetaQuote/Money Management Module> #include <Append/MetaQuote/Market Analysis Module> #include <Append/Method/Russian Roulette System Module> // ««« SYSTEM DEFINED CONSTANT SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» #define ProgramName "The Russian Roulette" #define SystemSymbol "TRR" #define LicenseTo "LICENSE TO: ...... Developmental Copy" // ««« EXTERN INPUT PARAMETER SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» extern int DealerTimeOffSet = Zero; // ««« SYSTEM DEFAULT PARAMETER SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» // Changing the system's default parameters will alter the system's functionality. int ScreenInformation = All, // Switch to show system screen information output. PauseInterval = 10000, // Pause interval between order placements (10sec). AttemptOrders = 2; // repeats order execution on failed attempt. double MinimumPoisionSize = 0.1, // The Smallest lot size permitted. MaximumPoisionSize = 20, // The Largest lot size permitted. RiskFactor = 10, // The percentage of account at risk. EmergencyStop = 30; // The stop spread to mantain on open orders. string AsianStarts = "00:30", // Asian market starting time. AsianEnds = "06:30", // Asian market ending time. EuropeStarts = "06:30", // European market start time. EuropeEnds = "12:30", // European market ending time. USstarts = "12:30", // US market starting time. USends = "18:30", // US market ending time. NoTradeStarts = "18:30", // No trade zone start time. NoTredeEnds = "00:30"; // No trade zone ending time. datetime OrderWindowLength = 2; // The order placment Window size, in minutes. // ««« GLOBAL SCOPE VARIABLES SECTION: »»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»»» .... .... ....
 
dear CeC,
seems we have the same head ;)
I like your coding style.

The reason I chose to implement everything through the indicator, is because EA's lack some of the gfx that can be used in indi's, and also, because you can muster both backwards testing AND live trading within the same system and indication, so you can also perform realtime, visual optimizations.

btw, beside currently creating a generic framework for trading, there's also a generic .dll being developed to give the ability to program with any language for MT4.

Do you think we can collaborate?

Great trading!
m
 
mishka:


The reason I chose to implement everything through the indicator, is because EA's lack some of the gfx that can be used in indi's, and also, because you can muster both backwards testing AND live trading within the same system and indication, so you can also perform realtime, visual optimizations.
Mishka

Can you explain your statement above in a little more detail ?

I would be glad to lend a hand with your project, but it appears we are working in two different directions. Your proposing a more universal muti language approch. ware as my work is in the area of extending the MQ language capabilities itself and establishing a structured modular coding style, through the construction and use of link libraries. Which will make MQ easier to use and more english like, hence the name 'L'anguage 'O'f 'R'eal 'E'nglish (LORE Language). [Webster's defines "Lore" as Knowledge gained by experience, tradition, belief, or study. ]

In any case, Maybe we should start a new thread, as we are way of topic here. =)

The CockeyedCowboy Z}.'^)
Reason: