MQL4 - automated forex trading   /  

Code Base

Code Base  Expert Advisors  AIS5 Trade Machine To post a new code, please log in or register

This Expert Advisor is for
MetaTrader 4
Download MT 4 - 5.5 Mb

Mobile trading!
Buy a license and be mobile in your trading!

Name:
AIS5 Trade Machine [ ru ]
Author: Ais (2009.11.08 10:18)
Downloaded: 1848
Download:
 AIS5TM.MQ4 (500.0 Kb)
 AT5.MQ4 (25.8 Kb) View
 1.TXT (24.7 Kb)
AIS5 Trade Machine


Modification: 50002
Edition Date: 2010.03.05


Copyright (C) 2010, MetaQuotes Software Corp.
http://www.metaquotes.net


Copyright (C) 2010, Airat Safin
http://www.mql4.com/users/Ais


Free Open Source Software



AS IS

Instructions

1. Set in box "Tools/Options/Charts":
1.1. "Max bars in history" equal to 100000000;
1.2. "Max bars in chart" equal to 100000000.

2. Close and open again terminal to accept changes.

3. Load history of demanded trading symbol.

4. Open the chart with demanded trading symbol.

5. Compile "AT5.MQ4" in directory "../experts/scripts" and execute the script.

6. AT5 script creates auxiliary file "XXXXXX.CSV" where "XXXXXX" is a name of trading symbol of the chart.

7. This file contains tick volume distribution on price points of the given trading symbol.

8. Set in box "Tools/Options/Charts":
8.1. "Max bars in history" equal to preferred value, for example, 100000;
8.2. "Max bars in chart" equal to preferred value, for example, 100000.

9. Close and open again terminal to accept changes.

10. Compile "AIS5TM.MQ4" in directory "../experts" and start it on the same chart.

11. AIS5TM will display the tick volume distribution on price "zones" with controlled step and initial shift.

12. To change zone shift and zone step press [F3] and:
12.1. set desirable value of Global Variable "AIS50001.Setup.7.1.ZoneBasePoints",
12.2. set desirable value of Global Variable "AIS50001.Setup.7.2.ZoneStepPoints",
12.3. set to "1" value of Global Variable "AIS50001.Setup.6.2.ZoneReset" to accept changes.

13. To reset market profiles set to "1" value of Global Variable "AIS50001.Setup.6.1.ProfileReset".



Important

1. Check and change working trading symbol by one of following ways:
1.1. change line 106 of "AIS5TM.MQ4": "extern string aes.Symbol = "EURUSD";" and recompile "AIS5TM.MQ4";
1.2. change value of external variable "aes.Symbol" at the start of AIS5TM.

2. About working size of history
2.1. Working size of history for AIS5TM depends on value of variable "aci.DateEnd" in line 37 of "AT5.MQ4":
"
...
#define aci.DateEnd D'2009.03.01 00:00' //< 37>
...
"
2.2. Auxiliary script AT5 "compresses" M1 history from Date Of Begin to "aci.DateEnd" and writes it in "*.CSV" file.
2.3. "Date Of Begin" is date of oldes M1 bar of history.
2.4. Set maximal depth/size of history before AT5 run.
2.5. Running script AT5 will output control messages in "Alert" window.
2.6. Set reduced depth/size of history after AT5 finish.
2.7. Reduced depth/size of history must be greater than number of M1 bars between current date and "aci.DateEnd".
2.8. For example, today for "aci.DateEnd == D'2009.03.01 00:00'" more then 260000 M1 bars in history is required.

15 comments: 1 2   To post a new comment, please log in or register

Complete Instructions is being prepared to release

12.03.2010 10:51 Ais

Hellow AIS I've seen some of your work Do you have a trading robot that uses 3 charts to trade off Please e-mail me at wjbetters1@att.net I have more questions and don't want to clutter the board with them

Thanks

WesB

04.03.2010 17:20 wjbetters
Ais wrote:

AIS5TM needs to read "*.CSV"........(Phil Edited)

Thanks


04.03.2010 14:53 pdufresne

Instruction has been added by points 12 and 13:

12. To change zone shift and zone step press [F3] and:
12.1. set desirable value of Global Variable "AIS50001.Setup.7.1.ZoneBasePoints",
12.2. set desirable value of Global Variable "AIS50001.Setup.7.2.ZoneStepPoints",
12.3. set to "1" value of Global Variable "AIS50001.Setup.6.2.ZoneReset" to accept changes.

13. To reset market profiles set to "1" value of Global Variable "AIS50001.Setup.6.1.ProfileReset".

04.03.2010 14:21 Ais

AIS5TM needs to read "*.CSV" file, while in the tester reading of files is prohibited.
I myself was very curious to see the market profiles in the tester.
But without using this file with compressed history AIS5TM worked very-very slow with 100% processor load and with grand memory consumption.
Therefore, for the sake of speed I have sacrificed the ability of backtesting.

In the next generation of my programs I will use my own tester with much more possibilities.

Thanks for testing!

Airat

04.03.2010 07:04 Ais

I have got it working fine on a demo account, but have'nt been able to get it going in backtesting. Is that normal? I am still getting the same errors while backtesting.

thanks in advance.

Phil

04.03.2010 05:31 pdufresne

Hello Phil,

Please confirm succesful execution of steps 1-7 of the Instruction:

1. Set in box "Tools/Options/Charts":
1.1. "Max bars in history" equal to 100000000;
1.2. "Max bars in chart" equal to 100000000.

2. Close and open again terminal to accept changes.

3. Load history of demanded trading symbol.

4. Open the chart with demanded trading symbol.

5. Compile "AT5.MQ4" in directory "../experts/scripts" and execute the script.

6. AT5 script creates auxiliary file "XXXXXX.CSV" where "XXXXXX" is a name of trading symbol of the chart.

7. This file contains tick volume distribution on price points of the given trading symbol.

The "*.CSV" file of ticks distribution is stored in folder "../experts/files".

Best regards

03.03.2010 11:45 Ais

Hello AIS, I am getting these errors when using new explanation, could you help me please?

2010.03.02 23:38:03 2008.10.01 00:00 AIS5TM: invalid handle -1 in FileReadNumber
2010.03.02 23:38:03 2008.10.01 00:00 AIS5TM EURUSD,M1: ArrayInitialize function internal error

2010.03.02 23:38:03 2008.10.01 00:00 AIS5TM EURUSD,M1: Alert: AIS50001 Trade Machine: External History Maximal M1 Range = 0 / 1970.01.01 00:00
Thanks again,

Phil


03.03.2010 07:43 pdufresne

Hello Kouzin6,

Please take a look at A Tool: Peak Volume Counter too.

These programs are made for each other.

28.02.2010 21:43 Ais

Hello AIS

Sorry to get long time without give "feel back" for your programm.

I was too busy by another business.

 It's now, i'm going to try your AIS5TM


28.02.2010 14:36 kouzin6