[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 212
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
MA_1_t=iCustom(Symbol(),0,"AMA_optimized",1,1); // ??_1
MA_2_t=iCustom(Symbol(),0,"AMA_optimized",2,1); // ??_2
MA_3_t=iCustom(Symbol(),0,"AMA_optimized",1,2); // ??_2
MA_4_t=iCustom(Symbol(),0,"AMA_optimized",2,2); // ??_4
//---------------------------------------------------------------- 5.1 ???? ?????
static datetime New_Time;
bool New_Bar;
bool wayUP, wayDOWN;
if(New_Time!=Time[0])
{
New_Time=Time[0];
New_Bar=true;
} else { New_Bar=false;
}
//---------------------------------------------------------------- 5.1
if (MA_1_t!=0 && wayDOWN==true) // && MA_3_t==0
{
if (New_Bar==true)
{
Opn_B=true;
New_Bar=false;
}
//Cls_S=true;
}
if (MA_2_t!=0 && wayUP==true) // && MA_4_t==0
{
if (New_Bar==true)
{
Opn_S=true;
New_Bar=false;
}
//Cls_B=true;
}
if (New_Bar==true) {
if (MA_3_t!=0 && MA_4_t==0) {wayUP=true;}
if (MA_4_t!=0 && MA_3_t==0) {wayDOWN=true;}
}
//--------------------------------------------------------------- 6 --
PEOPLE, we need to somehow remember up to 2 bars what the direction was and then compare it, if the direction is not the same as 1 bar, then open on 0 bar...
Or they won't help!
Может я не правельные вопросы задаю, черт побери?! мысли в члух
Step 2.1. Add the Period_Converter_Opt indicator to the chart you want to get a non-standard timeframe from. A window will open. Check the "Allow DLL import" box on the "General" tab.
Step 2.2. On the "Input Parameters" tab you can set several variables. The PeriodMultiplier variable is the multiplier for the original graph. For example, if you want to get the H1 chart as the H6 chart, you should set the value of 6.
The UpdateInterval variable is responsible for the frequency of chart updates. The default setting is zero - the chart is updated in real time. If you want to reduce the load on your computer's resources, increase this value.
The step between the regular MetaTrade timeframes is quite large - hourly, four-hour and daily charts. Therefore the M10, H2, H3, H6, H8, H12 charts may be useful.
The rest is as usual - open a chart offline, look for the created TF and run it.
Somewhere, sometime ago I encountered an operator or function which told the EA to work ONLY with orders of the instrument it was sitting on, ignoring orders of other pairs. I tried to find it now and could not. Maybe somebody can give me a quick hint?
Somewhere I have seen an operator or a function that tells the EA to work ONLY with orders of the instrument it is sitting on, ignoring orders of other pairs. I tried to find it now and could not. Can anybody give me a quick hint?
The magic parameter is responsible for this when opening an order.
Negative magic'.
The magic parameter when opening an order is responsible for this. when analysing orders, consider its uniqueness.
I meant the standard features of the language. Maybe I'm mistaken, maybe it was written somewhere separately and I didn't notice it. The whole code contains a lot of checks of the following kind
&& (OrderSymbol() == Symbol())
In Expert Advisor's code the required line (even with a comment) was in the beginning and the author didn't bother with orders of other currency pairs after that. Maybe, the orders were taken from the library ...
In short, the standard operator/function in MQL4, does it exist?
again, someone help me with deleting objects
how can i make this script delete objects not by name but by style, for example
help me, please
again, someone help me with deleting objects
how can i make this script delete objects not by name but by style, for example
help me out here
Personally, I would do the following:
for (int li_0 = 0; li_0 < ObjectsTotal(); li_0++) {
if (ObjectGet(ObjectName(li_0),OBJPROP_ARROWCODE)==158) {
ObjectDelete(ObjectName(li_0))
}
}
The loop with decrement only, otherwise you won't be able to figure out the object order if you delete them one by one.
Personally, I would do the following:
for (int li_0 = 0; li_0 < ObjectsTotal(); li_0++) {
if (ObjectGet(ObjectName(li_0),OBJPROP_ARROWCODE)==158) {
ObjectDelete(ObjectName(li_0))
}
}
A loop with decrement only - otherwise you won't be able to figure out the order of objects if you delete them one by one.
Well, I don't know mql at all, and the script works, but it has to be run 7 times and it still leaves a few objects on the chart
I don't know mql at all, but the script works, but it needs to be run 7 times and some objects will remain on the chart anyway
Maybe so:
This is the removal of arrows. If you are interested in other objects - read help on ObjectGet() function