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

 
reag:

It's just what I tried... Cyrillic )), the combination of Bars and IndicatorCounted() on a non-standard timeframe does not work, if the max bar in Bars window is exceeded it won't go further.


It worked for me on non-standard timeframes, like this one https://www.mql5.com/ru/code/9358 and even had an EA on it and traded on Renko

try it this way:

int lastbar0=iBarShift(NULL,0,Time[0],true);

if on your non-standard timeframe there is no bar with number zero, then the function iBarShift(NULL,0,Time[0],true); will give the number of the adjacent bar, and then try to experiment with this number - remember its parameters or time or something else

 
IgorM:

It worked for me on non-standard timeframes, like this one https://www.mql5.com/ru/code/9358 and I even put an EA on it and traded on Renko

It is interesting, I will look at it now, but I have to mention right away that indicators work on non-standard timeframe, and your Expert Advisor creates non-standard TF, maybe I got something wrong?
 
reag:

That's interesting, I will look it over but I have to mention right away that indicators work in a non-standard timeframe, while your EA creates a non-standard timeframe, maybe I got it wrong?


at the link the Expert Advisor creates a non-standard timeframe - it says what you need to do

I have thrown indicators and my EA on the created TF and everything worked and traded on a non-standard TF

 
IgorM:


the link to the Expert Advisor creates a non-standard TF - it says what you need to do

I have thrown indicators and my EA on the created TF and everything worked and traded on a non-standard TF


In that case, it would be good to have a code that will form regular candlesticks...
 
reag:

In that case, it would be good to have code that would form regular candles...


https://www.mql5.com/ru/code/9358

Isn't it like that in there?

 
IgorM:


https://www.mql5.com/ru/code/9358

Isn't that what it is?


No... I've started it up giving even candles...
 
reag:

No... I'm running a flat candle...


well it's Renko :)

Although I'm reading the forum materials now, to be honest, I'm getting tired of helping you, dig into kodobase, there are many similar things there - i.e. how to create a non-standard TF on your own

 
IgorM:


Well it's Renko :)

Although I'm reading the forum materials now, to be honest I'm getting tired of helping you, dig into kodobase, there are many similar ones there - i.e. how to create a non-standard TF on your own


Thanks! I'll have a look at that code... and maybe I'll set it up for myself!
 
There was an Expert Advisor like this somewhere - open a trade at random, if it closed in the red, then open the opposite one by 2 times increasing the lot. Where is it?
 
vlandex:
There was an Expert Advisor like this somewhere - open a trade at random, if it closed in the red, then open the opposite one by 2 times increasing the lot. Where is it?

search for it - marshmallow, martingale - something will pop up