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

 
abolk:
It's not "prejudiced" - it's like stealing. It's not good to take someone else's things without asking.
I don't feel positively about stealing either.... I just got an open source advisor....
 

Here is a sample code...

extern string A25="RSI Indicator settings";

extern int RSIPeriod= 21;

extern int RSIPrice = 0;

extern int RSIHighLevel= 70;

extern int RSILowLevel = 30;

//+------------------------------------------------------------------+
// Example:
//+------------------------------------------------------------------+

double RSI1 = iRSI(Symbolt, 0, RSIPeriod, RSIPrice, 1);
double RSI2 = iRSI(Symbolt, 0, RSIPeriod, RSIPrice, 2);
if(RSI2<RSILowLevel && RSI1>RSILowLevel && RSI1<RSIHighLevel) // Buy Signal
Signal=1;
if(RSI2>RSIHighLevel && RSI1<RSIHighLevel && RSI1>RSILowLevel) // Sell Signal
Signal=2;


This is the usual use of rsi.

Question: How do I place a pending order based on this code?

let's say rsi is above 70, how to put a pending order at a certain distance from the current price and vice versa

Can you at least help me with this? )

 
ostrik:
I don't have a positive attitude to stealing either.... I just got an Expert Advisor with open source code....


It all can be, but the original from the decompiled so far is not difficult to distinguish.

And that is the same as stealing. If you find the original, there won't be a problem.

Although there are original refinements, it is more complicated there.

 

how can I programmatically make the indicator only draw at a set time interval?


 
Eliza:

how can I programmatically make the indicator only draw at a given time interval?

1. "don't draw" or "don't calculate" ?

2. Put removing values from unnecessary ranges at the end of calculations. You have already been told about iBarShift.

3. be careful with IndicatorCounted

 
sergeev:

1. "don't draw" or "don't calculate" ?

2. Put removing values from unnecessary ranges at the end of calculations. You have already been told about iBarShift.

3. careful with IndicatorCounted

1. No, you do not have to calculate it. I do not want to see it on a chart, only on the time interval.

2. I see, only if I defined a bar further everything to the left or right of it should not be drawn... is there an example if not difficult?

3. I do not have it, I have another indicator that does not need this function.

 
Eliza:

2. I see, only if I have defined a bar then anything to the left or right of it should not be drawn... is there an example if not difficult?

right or left: not to draw using the indicator buffer, it means either not to calculate (not to assign) its value, or assign the EMPTY_VALUE value

left: limit the drawing of the indicator to the left - set the number of bar up to which the values will not be drawn in the function init() with SetIndexDrawBegin()

 
Eliza:

1. No, I do not want it to be visible on the chart, only where it should be in the timeframe.

2. I see, only if I have defined a bar further to the left or right of it do not draw... Do you have an example, if it's not too complicated?

3. I do not have it, I have another indicator that does not need this function.

Simply assign the required indicator buffer indices to EMPTY_VALUE
 

It doesn't work, I don't even have any buffers in this indicator(.

Here is the function which sets the coordinates in the indicator....

//имя - name, координата1 - value, координата2 - value1, цвет - line_color
void PlotLine(string name,double value,double value1,double line_color)
{
   double valueN=NormalizeDouble(value,Digits);
   double valueN1=NormalizeDouble(value1,Digits);
   bool res = ObjectCreate(name,OBJ_TREND,0,Data_1,valueN,Data_2,valueN1);
   ObjectSet(name, OBJPROP_WIDTH, 1);
   ObjectSet(name, OBJPROP_STYLE, style);
   ObjectSet(name, OBJPROP_RAY, false);
   ObjectSet(name, OBJPROP_BACK, true);
   ObjectSet(name, OBJPROP_COLOR, line_color);
} 
 
Eliza:

I can't, I don't even have any buffers in this indicator(.

Here is the function which sets the coordinates in the indicator....


then filter the time
Data_1
Reason: