[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 61

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
Dear experts, please answer the question:
MetaEditor has text files of programme creation templates. They are used by the wizard when creating a programme. In the template text the parameters of the type of the created program file are specified. There are tags between them parameters that are not displayed in the code text. But the terminal recognizes them somehow. If an Expert Advisor is created, the Start function is launched after the next tick. If an indicator is created, the Start function is launched without a tick. Where do tags and everything in them go?
I did two more tests to see where it all comes from:
1. I read from ini not into array of strings, but into separate variables. The result is as expected, i.e. the copying is not a value but a reference:
the obtained result:
2009.04.10 14:31:42 example AUDUSD,H4: init.4: Cross_3=USDJPY
2009.04.10 14:31:42 example AUDUSD,H4: init.4: Cross_2=GBPUSD
2009.04.10 14:31:42 example AUDUSD,H4: init.4: Cross_1=EURUSD
2009.04.10 14:31:42 example AUDUSD,H4: init.3: read complete
2009.04.10 14:31:42 example AUDUSD,H4: init.3: Cross_3=USDJPY
2009.04.10 14:31:42 example AUDUSD,H4: init.3: Cross_2=GBPUSD
2009.04.10 14:31:42 example AUDUSD,H4: init.3: Cross_1=EURUSD
2009.04.10 14:31:42 example AUDUSD,H4: -------------------------------
2009.04.10 14:31:42 example AUDUSD,H4: init.2: Cross_3=USDJPY
2009.04.10 14:31:42 example AUDUSD,H4: init.2: Cross_2=USDJPY
2009.04.10 14:31:42 example AUDUSD,H4: init.2: Cross_1=USDJPY
2009.04.10 14:31:42 example AUDUSD,H4: init.1: read complete
2009.04.10 14:31:42 example AUDUSD,H4: init.1: Cross_3=USDJPY
2009.04.10 14:31:42 example AUDUSD,H4: init.1: Cross_2=GBPUSD
2009.04.10 14:31:42 example AUDUSD,H4: init.1: Cross_1=EURUSD
2. returned the array of string, but instead of the function reading from the ini string values
used a test function, which doesn't call anything from win api
result
2009.04.10 14:41:12 example AUDUSD,H4: init.4: CrossName[3]=CROSS_3
2009.04.10 14:41:12 example AUDUSD,H4: init.4: CrossName[2]=CROSS_2
2009.04.10 14:41:12 example AUDUSD,H4: init.4: CrossName[1]=CROSS_1
2009.04.10 14:41:12 example AUDUSD,H4: init.3: read complete
2009.04.10 14:41:12 example AUDUSD,H4: init.3: CrossName[3]=CROSS_3
2009.04.10 14:41:12 example AUDUSD,H4: init.3: CrossName[2]=CROSS_2
2009.04.10 14:41:12 example AUDUSD,H4: init.3: CrossName[1]=CROSS_1
2009.04.10 14:41:12 example AUDUSD,H4: -------------------------------
2009.04.10 14:41:12 example AUDUSD,H4: init.2: CrossName[3]=CROSS_3
2009.04.10 14:41:12 example AUDUSD,H4: init.2: CrossName[2]=CROSS_2
2009.04.10 14:41:12 example AUDUSD,H4: init.2: CrossName[1]=CROSS_1
2009.04.10 14:41:12 example AUDUSD,H4: init.1: read complete
2009.04.10 14:41:12 example AUDUSD,H4: init.1: CrossName[3]=CROSS_3
2009.04.10 14:41:12 example AUDUSD,H4: init.1: CrossName[2]=CROSS_2
2009.04.10 14:41:12 example AUDUSD,H4: init.1: CrossName[1]=CROSS_1
has shown that the problem seems to be in the conversion of
How should it be? Logically I was thinking to determine the ORDtype before the signal is formed. otherwise how will it be taken into account in the trading criteria. and another snag - positions are not opened even with an empty history((
Answered you in private - I think it will be more productive this way.
It is much easier, not to re-invent the wheel, and take one of the ready-made Expert Advisors, trading on the martingale and see how it is already implemented.
For example, Universum 3.0.
Thank you, I completely agree-everything was invented a long time ago
'Any newbie question, so as not to clutter up the forum. Don't let the pros pass you by. Nowhere without you.'
Thank you
Execution of init() function when testing EA in tester.
I want to normalize some extern variables in the init() function of the EA
and use these normalized values to call the indicator from start().
I don't want to include this normalization in start().
Will the init() function be executed every time an external variable is changed during optimization of the EA in the strategy tester?Execution of init() function when testing EA in tester.
I want to normalize some extern variables in the init() function of the EA
and use these normalized (new) values for calling the indicator from start().
I don't want to include this normalization in start().
Will the init() function be executed every time an external variable is changed during optimization of the EA in the strategy tester?Yes, it will be
int start()
{
if (OrdersTotal() == 0
&& TimeDayOfWeek(TimeCurrent()) == 5
&& TimeHour(TimeCurrent()) == 12
&& TimeMinute(TimeCurrent()) == 30
&& TimeSeconds(TimeCurrent()) >= 00)
{
Alert("Тра ляля");
OrderSend(Symbol(),OP_SELL,Lots,Bid,3,0,0,"sell",999999,0,Red);
}
Anybody have any idea why an order isn't opening here? What am I doing wrong?
Okay, this one... Gotta wait till Friday, if there's a tick within that minute, it should open.
Okay, this one... Got to wait till Friday, if there's a tick within that minute, it should open.
>> That's the thing, I do it on Friday or any other day of the week and the alert works and the order doesn't open at all.