[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 602

 
L-user:

How can I use object crate and object set to draw a horizontal line in a stochastic window, for example?

ObjectCreate(name, OBJ_VLINE, window, time,0,0,0);

where name - name of the line,

window - the number of the window in which the line should be drawn (it has to be set manually in the settings of the indicator which will draw the line, because mql cannot programmatically determine the second one (0 - main chart and 1 - first sub-window)

time - time, at which the line is drawn

 
keekkenen:

it must be the indicator, not the Expert Advisor...

The point is that after the start on the nth tick when the condition is triggered for the first time

if(MA_buffer1[SIGNAL_BAR] - 0.3 > 0 && 0.3 - MA_buffer1[SIGNAL_BAR+1] >= 0)

will execute PrevSignal = 1;

and more, by the condition if(PrevSignal <= 0)

there will be no alerts. The same is true for the second variant

If no alerts are triggered at all, it means the conditions for them don't come at all...

And what value should this condition be changed to if(PrevSignal <= 0) ?
 
41ckm39fi:
And what value to change this condition if(PrevSignal <= 0) ?

Everything related to PrevSignal should be removed altogether, then you will have every new bar checking the conditions and giving an alert,

if one or both conditions are met...

 
keekkenen:

Everything related to PrevSignal should be removed altogether, then you will have every new bar checking the conditions and giving an alert,

if one or both conditions are met...

Thanks now I will try to do that.
 
#property  indicator_level1 0.3
#property  indicator_level2 0.7
//---- 
extern int        period_MA            = 5,
                  period_DeMarker      = 14;
//---- 
double            DeMarker_buffer0[],
                  MA_buffer1[],
                  Signal_Buffer2[];
                  
#define SIGNAL_BAR 1
//+------------------------------------------------------------------+
//|   
//+------------------------------------------------------------------+
int start()
  {
  int    i,limit=ArraySize(DeMarker_buffer0);
         ArraySetAsSeries(DeMarker_buffer0,false);
  int    counted_bars=IndicatorCounted();
//----
   if(counted_bars>0) counted_bars--;
   limit=Bars-counted_bars;
//----
  for(i=limit; i>=0; i--)
  DeMarker_buffer0[i]=iDeMarker(NULL,0,14,1);
//---- 
  for(i=limit; i>=0; i--)
  MA_buffer1[i]=iMAOnArray(DeMarker_buffer0,limit,5,0,MODE_LWMA,i);
//----  
                if(MA_buffer1[SIGNAL_BAR] - 0.3 > 0 && 0.3 - MA_buffer1[SIGNAL_BAR+1] >= 0)  
//---- 
                                Alert( "sMA(", Symbol(), ", ", Period(), ")  -  BUY!!!" );
//----
                if(0.7 - MA_buffer1[SIGNAL_BAR] > 0 && MA_buffer1[SIGNAL_BAR+1] - 0.7 >= 0)
//----               
                                Alert("sMA(", Symbol(), ", ", Period(), ")  -  SELL!!!");
                        
   return(0);
  }
I have removed everything related to PrevSignal but the message does not appear.
 
Noterday:

Please advise how to solve the problem!

I am testing an EA by ticks, the EA uses not only the standard indices, but also custom iCustom ones.

After the test is passed (without visualization), I press the Open Chart button and the following screen appears:

WHERE ARE THE INDICATORS used by the EA? I remember that they were shown before, but now they aren't... How to make them appear not by adding them manually, but automatically, when viewing a chart after testing????

I'd like to see what kind of inducators give such a coherent picture, if it's not too bad...
By the way, I have the same shit going on lately. It used to show me all the indices anyway, but now it doesn't. Not at all...
I have simply called a template with the EA's name and it shows it to me automatically when testing. With all my indulgences.
 
keekkenen:
look for division by a variable, 100% you will find the value 0 in it...
Great... I don't have division anywhere there, only multiplication. I checked it all out first of all.
I found such a miracle - I had variable MA150_1 set which, as one can easily guess, reads values of iMA on the first bar, so I had a name but its value had not been assigned in any way - I don't know why the copmiler didn't moan, but it turned out that division by zero was there. Of course, the variable's value was zero since I hadn't assigned it, but I wasn't dividing anything by it, I was only comparing over-under...
Anyway... I found it... :)
 
artmedia70:
I'd like to see what indictors give such a slender picture, if it's not too bad...

Where did you see the perfect picture?))) Look at the drawdowns after opening orders =) If you look at the drawdown after opening an order, you'll see the drawdowns after that ... And the close is on take profit and not on condition ... This is not good ... =(

I will not reveal it yet, I will finish it all to my mind... If I do that, I'll send it to code base...

 

Is there a threshold for being paid? Or all of these EAs are for suckers who buy them, I do not know if I screwed up or not(

 
Mnogo:

Is there a threshold for being paid? Or all of these EAs are for suckers who buy them, I do not know if I screwed up or not(


I don't know if I fucked up or not(!) There is no difference for brokerage companies whether a person or a robot trades. If the client wants to withdraw their money, the brokerage company is obliged to do it (if there were no violations of the rules of this brokerage company in the process of trading).
Reason: