[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 229
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
I didn't decompile it, that's how I got it...
It makes absolutely no difference.
I didn't decompile it, that's how I got it...
And in general, experts of this kind are even on this resource in bulk and with open source. It was some kind of plum EA, worked at the intersection of price and waving. I replaced it with another indicator, and that's all. And ran into this problem.
Hello, help please can't understand... I have an EA that works on oscillator signals, opens positions after crossing zero. I want to make it open a position when current bar has closed and the signal has formed. It may open and close a position a few times in a minute :) Until the signal adjusts.
Here is the code:
extern double Lot = 0.1;extern double Per = 14;
bool gi_84 = TRUE;
int gi_88 = 366;
double gd_92 = 0.02;
double gd_100 = 0.2;
int g_period_108 = 14;
int gi_112 = 50;
int g_slippage_116 = 0;
void start() {
int l_cmd_52;
int l_ticket_56;
string l_symbol_0 = Symbol();
double l_isar_8 = iCustom(NULL,0, "daytrend-t01",Per,0,0);
double l_isar_9 = iCustom(NULL,5, "daytrend-t01",Per,0,0);
int l_cmd_40 = -1;
int l_ord_total_44 = OrdersTotal();
Lot = MathMax(Lot, MarketInfo(l_symbol_0, MODE_MINLOT));
for (int li_48 = l_ord_total_44; li_48 > 0; li_48--) {
if (OrderSelect(li_48 - 1, SELECT_BY_POS) == TRUE) {
l_cmd_52 = OrderType();
if (OrderSymbol() != l_symbol_0 || l_cmd_52 < OP_BUY || l_cmd_52 > OP_SELL) continue;
l_ticket_56 = OrderTicket();
RefreshRates();
if (l_cmd_52 < OP_SELL) {
if (l_isar_8 > 0) {
while (OrderClose(l_ticket_56, Lot, Bid, g_slippage_116) == 0) FunError(gi_112);
l_cmd_40 = -1;
continue;
}
} else {
if (l_isar_8 < 0 ) {
while (OrderClose(l_ticket_56, Lot, Ask, g_slippage_116) == 0) FunError(gi_112);
l_cmd_40 = -1;
continue;
}
}
l_cmd_40 = l_cmd_52;
}
}
if (l_cmd_40 < OP_BUY && g_period_108 == 0 || DayOfYear() < gi_88) {
RefreshRates();
if (l_isar_8 < 0 && l_isar_9 < 0 ) while (OrderSend(l_symbol_0, OP_BUY, Lot, Ask, g_slippage_116, 0, 0) == 0) FunError(gi_112);
else
if (l_isar_8 > 0 && l_isar_9 > 0 ) while (OrderSend(l_symbol_0, OP_SELL, Lot, Bid, g_slippage_116, 0, 0) == 0) FunError(gi_112);
}
}
void FunError(int ai_0) {
Sleep(ai_0);
RefreshRates();
}
void deinit() {
}
I use the following code for this:
bool Fun_New_bar()
/*
function is designed to detect if there is a new bar,
if new bar is caught "true" otherwise "false".
===========
Variables:
===========
Test_Time - Test time
*/
{
static datetime Test_Time=0;
if(Test_Time!=Time[0])
{
Test_Time=Time[0];
return(true);
}
return(false);
}
To my question please help me if i know or tell me if it is impossible to do so... i am looking for an answer for 3 days and still no luck. :-(
For my question please help who knows or tell me if it is impossible to do so ... I have been looking for an answer for 3 days and so far to no avail. :-(
Custom UI is used to customize the settings. That is, a window that has been specially developed for a specific task (for specific indicators). There is no possibility to create such windows in Metatrader. This means that they have to be created somewhere else, with an executable file. The executable file can be either Exe or Dll. Dll can be called at the start of an indicator/script, it is clearly more convenient.
The Custom UI is used to set the parameters. I.e. a window that has been specially designed for a specific task (for specific indicators). There is no possibility to create such windows in Metatrader. This means that they have to be created somewhere else, with an executable file. The executable file can be either Exe or Dll. You may call the Dll at the indicator/script start, it is more comfortable.
Thank you!!!
If you'd like to share the article where it's described, I'll get really grateful to you... :-)
Thank you!!!
The question is how to configure interface between objects on "main form" and variables in MQL4, if you share with me some links to articles about it, I'll just explode with gratitude... :-)
Well, my impression is that it's best to ignore the Dll,
show modally may be dangerous (it's an indicator on UI thread, you can get consequences)-.
or maybe not... In general, the form can be run in a separate environment - with Wtl everything turned out great.
The indicator will wait for a flag that it is allowed to work and will interrogate this form.
And then - when the form shows ready - there are different functions like get(int & to[]), with pointers/references,
which will transfer different data. With strings, there might be trouble...
And you will share the link to the article with me ;-).
Well, I'm under the impression that it's best to ignore the Dll,
show it modally might be dangerous (it's on UI thread, you might get consequences)-
or maybe not... In general, the form can be run in a separate environment - with Wtl everything turned out great.
The indicator will wait for a flag that it is allowed to work and will interrogate this form.
And then - when the form shows ready - there are different functions like get(int & to[]), with pointers/references,
which will transfer different data. With strings, there might be trouble...
You may share the link to the article with me ;-).
The question was how the standard indicators draw a new tab "Parameters" when selecting the settings of the indicator operation itself, with the possibility to replace the numbers with something more readable.
For example if you call the MA:
in the code of the indicator it is the variable "MA_Method" and the selection of the method goes by the condition
switch(MA_Method)
{
case 1 : short_name="EMA("; draw_begin=0; break;
case 2 : short_name="SMMA("; break;
case 3 : short_name="LWMA("; break;
default :
MA_Method=0;
short_name="SMA(";
You suggest to execute an exe compiled from another environment during initialization, it is really possible to execute an exe file during initialization, but then there is another problem - how to pass data from the program to variables of the indicator itself?
i.e. how to pass a value of combobox1.text converted to a number to MA_Method?
It is not esthetic through a file and it seems that MetaTrader and my "test.exe" have no common memory space.
Thank you. I'll give it a try now.
//------------------------------------------
Yes, it worked. The experts are working.
And it didn't work for me :-( I am still getting the error excuse and closing MT