Hi mrtools, thanks, the version you entered is better because if I leave the indicator in a specific timeframe without changing it then does not make any repaint but if I change the timeframe and then go back to the previous timeframe the indicator makes repaint, you can fix also this detail?
Re: Coding Help
882From what i can tell from the code the only way the oscillator can repaint if you are using a negative shift.Daniele wrote: Wed Dec 05, 2018 1:29 am
Hi mrtools, thanks, the version you entered is better because if I leave the indicator in a specific timeframe without changing it then does not make any repaint but if I change the timeframe and then go back to the previous timeframe the indicator makes repaint, you can fix also this detail?
Re: Coding Help
883mrtools wrote: Wed Dec 05, 2018 2:15 am
From what i can tell from the code the only way the oscillator can repaint if you are using a negative shift.
But if I put the indicator on m1 and then move to another timeframe and return immediately on m1 the values of the yellow line will be different so I am forced not to change the timeframe.
Re: Coding Help
884mrtools wrote: Wed Dec 05, 2018 2:15 am
From what i can tell from the code the only way the oscillator can repaint if you are using a negative shift.
I have to give an update about the repaint, I saw that it makes repaint even if I leave the indicator stationary in a single timeframe so you can not use it well. The first image is this morning and the second image I created it now and you can see that the values are not the same as this morning's image.
Re: Coding Help
885Dear Sir,
I have quection how to increased the order???
EX: this EA only open 1 trade, but i want to open more trades (3 orders) at same time.
Thanks.
extern double Lots = 0.01;
extern int StopLoss = 300;
extern int TakeProfit = 50;
int g_bars_92;
bool gi_96 = TRUE;
int init() {
if (Digits == 3 || Digits == 5) {
StopLoss = StopLoss;
TakeProfit = TakeProfit;
}
return (0);
}
int deinit() {
return (0);
}
int start() {
if (g_bars_92 < Bars && TOOC() == 0 && g_bars_92 != 0 && gi_96) OrderSend(Symbol(), OP_BUY, Lots, Ask, 0, Bid - StopLoss * Point, Ask + TakeProfit * Point, 0, 0, 0, Red);
g_bars_92 = Bars;
if (TOOC() == 1) gi_96 = FALSE;
Comment("Error: ", GetLastError());
return (0);
}
int TOOC() {
int li_ret_0;
for (int l_pos_4 = 0; l_pos_4 < OrdersTotal(); l_pos_4++) {
if (OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol() == Symbol()) li_ret_0++;
}
return (li_ret_0);}
}
I have quection how to increased the order???
EX: this EA only open 1 trade, but i want to open more trades (3 orders) at same time.
Thanks.
extern double Lots = 0.01;
extern int StopLoss = 300;
extern int TakeProfit = 50;
int g_bars_92;
bool gi_96 = TRUE;
int init() {
if (Digits == 3 || Digits == 5) {
StopLoss = StopLoss;
TakeProfit = TakeProfit;
}
return (0);
}
int deinit() {
return (0);
}
int start() {
if (g_bars_92 < Bars && TOOC() == 0 && g_bars_92 != 0 && gi_96) OrderSend(Symbol(), OP_BUY, Lots, Ask, 0, Bid - StopLoss * Point, Ask + TakeProfit * Point, 0, 0, 0, Red);
g_bars_92 = Bars;
if (TOOC() == 1) gi_96 = FALSE;
Comment("Error: ", GetLastError());
return (0);
}
int TOOC() {
int li_ret_0;
for (int l_pos_4 = 0; l_pos_4 < OrdersTotal(); l_pos_4++) {
if (OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol() == Symbol()) li_ret_0++;
}
return (li_ret_0);}
}
Re: Coding Help
886That looks like decompiled code. Have no idea!hock87 wrote: Wed Dec 05, 2018 12:09 pm Dear Sir,
I have quection how to increased the order???
EX: this EA only open 1 trade, but i want to open more trades (3 orders) at same time.
Thanks.
extern double Lots = 0.01;
extern int StopLoss = 300;
extern int TakeProfit = 50;
int g_bars_92;
bool gi_96 = TRUE;
int init() {
if (Digits == 3 || Digits == 5) {
StopLoss = StopLoss;
TakeProfit = TakeProfit;
}
return (0);
}
int deinit() {
return (0);
}
int start() {
if (g_bars_92 < Bars && TOOC() == 0 && g_bars_92 != 0 && gi_96) OrderSend(Symbol(), OP_BUY, Lots, Ask, 0, Bid - StopLoss * Point, Ask + TakeProfit * Point, 0, 0, 0, Red);
g_bars_92 = Bars;
if (TOOC() == 1) gi_96 = FALSE;
Comment("Error: ", GetLastError());
return (0);
}
int TOOC() {
int li_ret_0;
for (int l_pos_4 = 0; l_pos_4 < OrdersTotal(); l_pos_4++) {
if (OrderSelect(l_pos_4, SELECT_BY_POS, MODE_TRADES))
if (OrderSymbol() == Symbol()) li_ret_0++;
}
return (li_ret_0);}
}
Re: Coding Help
887mrtools wrote: Wed Dec 05, 2018 2:15 am
From what i can tell from the code the only way the oscillator can repaint if you are using a negative shift.
Hello mrtools, now I understand the problem of repaint, if you look at the post where I entered the 2 images you can see that the yellow line does not change then does not repaint but the red lines make the repaint, you think you can arrange the red lines ?
Re: Coding Help
888Think this is what they were trying to do but not sure.Daniele wrote: Fri Dec 07, 2018 4:17 am
Hello mrtools, now I understand the problem of repaint, if you look at the post where I entered the 2 images you can see that the yellow line does not change then does not repaint but the red lines make the repaint, you think you can arrange the red lines ?
Re: Coding Help
889Dear Coders, Mladen and MrTools,
please improve / optimize the attached indicators in a way
they will work properly and smoothly for any broker, etc.
The indicators generate seconds chart(s) as an offline chart.
Thank you!
please improve / optimize the attached indicators in a way
they will work properly and smoothly for any broker, etc.
The indicators generate seconds chart(s) as an offline chart.
Thank you!
Re: Coding Help
890Dear coders
is there anybody to help me find problems for this indicator?
thanks in advanced
is there anybody to help me find problems for this indicator?
thanks in advanced