Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.
From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.
Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
Elite Section
Get access to private discussions, specialized support, indicators and trading systems reported every week.
Advanced Elite Section
For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
Welcome to the second part of creating Your First Expert Advisor lesson.
In the previous part we have taken the code generated by the new program wizard and added our own code which we are going to crack it today line by line.
Did you wear your coding gloves? Let’s crack.
Note: I have to repeat that our expert advisor is for educational purpose only and will not (or aimed to) make profits.
Why don't download the lesson and enjoy it (I hope)?
I believe that should be "Stop losses are always set BELOW the current bid price on a buy and ABOVE the current asking price on a sell"
Hi Barry,
You are right! I'll change that.
Quote:
Originally Posted by barry
Question: Why is the line
Code:
int Crossed (double line1 , double line2)
positioned where it is, i.e., after the expert deinitialization function and before the expert start function?
Thanks again for a great course!
int Crossed (double line1 , double line2)
The above line is the function declaration
It means we want to create Crossed function which takes two double data type parameters and returns an integer.
When you call this function you have to pass to it two double parameters and it will return an integer to you.
You have to declare the function before using (calling) it. The place of the function doesn't matter, I placed it above start() function, but you can place it anywhere else.
Please for the help: how to add to Expert Advisor pointers (arrows) showing coming into being of trading conditions (but not the concrete transaction!). This would be very useful for the purpose of the visual presentation of the rightness of the prompt from the EA under of tests before transactions.
I know that one can add pointers to indicators using code:
//---- indicator line
IndicatorBuffers(2);
SetIndexStyle(0,DRAW_ARROW);
SetIndexArrow(0,233);
SetIndexStyle(1,DRAW_ARROW);
SetIndexArrow(1,234);
........
But what to make, if EA uses with several indicators. Then pointers would be added to EA code. Please for the help how can I make this.