Thread: Trailing file
View Single Post
  #1 (permalink)  
Old 12-12-2005, 03:09 PM
newdigital newdigital is online now
Administrator
 
Join Date: Sep 2005
Posts: 16,311
Blog Entries: 106
newdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud ofnewdigital has much to be proud of
Trailing file

Use this file for the simple trailing stop (created by Kimiv).
It means the EA will use this file to move stop loss.

1. insert attached file to the \experts\include

2. #include <b-SimpleTrailing.mqh> should be included in the code of EA (your EA)

3. in 'start' function of your EA add the following code:
if (UseTrailing) TrailingPositions();

4. after compilation of your EA (in MetaEditor) you will see the new settings:
extern string _Parameters_Trailing = "------ settings of the trailing";
extern bool UseTrailing = True; // Use Trailing
extern bool ProfitTrailing = True; // Use Profit Trailing
extern int TrailingStop = 60; // Fixed Trailing
extern int TrailingStep = 5; // Trailing steps

5. to work currectly with this structure you should define and initialize the constant MAGIC:
#define MAGIC 20051119

This file uses the following settings:

extern bool UseSound = True; // Use sound
extern string NameFileSound = "expert.wav"; // name of the file for the sound
extern color clModifyBuy = Yellow; // Color of the modifybuy
extern color clModifySell = Pink; //
Attached Files
File Type: rar b-SimpleTrailing.rar (909 Bytes, 397 views)

Last edited by newdigital; 12-12-2005 at 04:05 PM.
Reply With Quote