[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 437

 
LOA:


Good day! I do not know whether to take it as a praise or vice versa, but in any case, thanks for the answer.

I can't find the solution, unfortunately, that's why I think quality and grammar are the most important, and I have a gap with that, as I understand it, because the code didn't work.

I am waiting for an answer to my question.....


It is difficult to check anything without having all the indicators used

I am waiting for an answer to my question, especially when I have to check correctness of all indicators

 
Vinin:


It's hard to check anything without all of the indicators used

All the more reason to check that all indicators are working correctly


Victor, good day!

There are also two indicators involved. Their code is simple. I am attaching their code.

Thank you very much for your participation and help.

 
Can you tell me how to compare the current price of the current bar with the maximum price of the previous bar?
 
how many cells can be created in an array like double m[x][y]; I tried this - double m[10000][10000]; - the compiler frowns, where can I find out?
 
Roman.:


Familiarize yourself with the concepts of EQUITY and BALANCE and the difference between them.

This indicator shows the equity line in real time, as the equity line is the current profit/loss on unclosed positions, "It is possible to really determine the equity by key points (order closures)" - not possible, so you would count the change of equity line on closed positions.

"The equity is somehow calculated on the basis of historical data" - no. This indicator calculates the equity line for the current moment on the basis of open positions in the Market.

Got it. So I'll have to save it to a file so I can analyse it later.
 
forexnew:
So you'll have to save it to a file so you can analyse it later.
Yes. As an option - why not, there too - we should think out a recording algorithm... not all in a row, but selective, like conditions - current loss exceeding the market orders of the previous one, then the recording.
 
fore-x:
how many cells can be created in an array of type double m[x][y]; I tried this way - double m[10000][10000]; - compiler frowns, where can I find out about it?
Perhaps there is a restriction somewhere, I would suggest that the array's size in memory should not exceed 65 kilobytes. You may try int/bool type for a change.
 

Who can explain this effect. On visualisation the code returns angle_line variable (returns angle), but on test and run it does not (returns 0). Thanks!

//+------------------------------------------------------------------+
//| Proverka.mq4 |
//| asb |
//| |
//+------------------------------------------------------------------+
#property copyright "asb"
#property link ""
extern int Bar_First_1=3;
extern int Bar_Sec_1=0;
extern int Applied_Price_First;
extern int int Applied_Price_Sec;

//+------------------------------------------------------------------+
int start()
{
//----

double a_price_UP= iMA(NULL,0,1,0,0,Applied_Price_First,Bar_First_1);
double a_price_DOWN=iMA(NULL,0,1,0,0,Applied_Price_Sec, Bar_Sec_1);
double angle_line=ObjectGet("LineAngle",OBJPROP_ANGLE);

Print(" angle_line ",angle_line," a_price_UP ",a_price_UP," a_price_DOWN ",a_price_DOWN);

SetTLineByAngle(Red, "LineAngle",Time[Bar_First_1],a_price_UP,Time[Bar_Sec_1],a_price_DOWN,0,0,0);
//----

//----
return(0);
}
//+----------------------------------------------------------------------------+
void SetTLineByAngle(color cl, string nm=",
datetime t1=0, double p1=0, datetime t2=0, double p2=0,
double an=0, bool ry=False, int st=0, int wd=1) {
if (nm=="") nm=DoubleToStr(Time[0], 0);
if (t1<=0) t1=Time[0];
if (p1<=0) p1=Bid;
if (t2<=0) t2=Time[0];
if (ObjectFind(nm)<0) ObjectCreate(nm, OBJ_TRENDBYANGLE, 0, 0,0;)
ObjectSet(nm, OBJPROP_TIME1, t1);
ObjectSet(nm, OBJPROP_PRICE1, p1);
ObjectSet(nm, OBJPROP_TIME2, t2);
if (p2>0) ObjectSet(nm, OBJPROP_PRICE2, p2);
else ObjectSet(nm, OBJPROP_ANGLE, an);
ObjectSet(nm, OBJPROP_COLOR, cl);
ObjectSet(nm, OBJPROP_RAY, ry);
ObjectSet(nm, OBJPROP_STYLE, st);
ObjectSet(nm, OBJPROP_WIDTH, wd);
}
//+----------------------------------------------------------------------------+

 

Function from Kimiv SetTLineByAngle, reliable, no idea where I could go wrong.

 
splxgf:

In general, it is a good idea to go through the orders starting with the last one. In the second case, don't be afraid to add parentheses to the condition.


Can you elaborate on why this condition is not taken into account in the first case and taken into account in the second?
Reason: