[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 39
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
And here, the GA is increasing the number of runs? Is that possible?
Oops!
Extremely interesting case...)
Whoa!
Extremely interesting case...)
No more options than possible
https://book.mql4.com/ru/appendix/limits
Thank you, I looked it up but didn't understand anything. For example:
A trade is not executed if any of the specified requirements is violated
SellLimit
1) OpenPrice-Bid ≥ StopLevel
2) SL-OpenPrice ≥StopLevel(further in the example)
3) OpenPrice-TP ≥ StopLevel
What does "Trading operation is not executed" mean? If a pending order is not placed (accepted) or if it is already placed, it does not trigger (what happens to it - is it deleted by the broker)? I repeat the question, if conditions have changed and a successfully placed order an hour later for example has SL-OpenPrice in changed by that moment StopLevel, what will happen to it?
And another question. Suppose the spread was 2 and it has become 7 points. What does it mean - has the bid or ask price changed, or does the broker select it arbitrarily as he sees fit?
When trying to compile a include file (*.mqh) an error '\end_of_program' - no function defined. What's wrong and how to fix it?
extern double Lots = 0.0;
extern int Percent = 0;
extern int StopLoss = 100;
extern int TakeProfit = 40;
extern int TrailngStop = 100;
int Level_New;
int Level_Old;
I looked at the cover of the STUDY book from all sides and still don't understand anything...))
I see it written like this everywhere:
Is the below writing fair if I want to get Price = OrderOpenPrice() for further processing and setting Stops?
It works for me, but is this acceptable?
No built-in functions, you just need to write your own wizard with calculation period depending on the timeframe
Good day to you all!
Writing for the first time, if something is wrong, sorry.
Question, why function (see below) gives error: 'A' - array item cannot be assigned?
Thanks in advance!When trying to compile a include file (*.mqh) an error '\end_of_program' - no function defined. What's wrong and how to fix it...?
When you try to separately compile .mqh, the compiler tries to determine the type of the product (Expert Advisor, indicator...) and starts to ask "where have you started?
You should start to deal with .mqh if errors occur during proper compilation.
I have inserted a new block in my EA to calculate the lot size of the position to be opened. The idea is as follows:
1. The stop is set to the High of the current day in case of a Sell position, and to the Low of the day in case of a Buy position.
2. When the condition for opening of the order triggers, this block for lot calculation starts to be executed. The distance to the High/ Low of the day in points is calculated and I loop through the lots starting from 0.1 to find the needed lot (5% when a stop has triggered)
But in the log these lines appear:
2011.01.30 16:59:47 TestGenerator: unmatched data error (volume limit 1107 at 2011.01.13 14:45)
As soon as I turn off this unit, everything is OK. Where am I wrong? Please advise.
Here is the code itself: