Coding help - page 194

 
mladen:
Yes, because it works correctly. If all that needs to be corrected would be done in the one you posted they would be exactly the same regards

Thank you!

 

Младен не посмотрите мой пост?

нужно добавить ещё одну полоску.

 
shtopr:
Всем привет!

дорого дня!!

помогите добавить красную полоску в индикатор

полоска зелёная работает хорошо (bear;// Lime)

красная не работает(bull;// Red;)

заранее Спасибо.

индикатор:

bearbull.mq4

shtopr

There are two values (value for bulls and value for bears) so there should be two columns too. This is one possible way how you could do it. Left column is a state of bears, right column is the state of bulls

Files:
bb.gif  33 kb
 

Младен Спасибо за ответ!

простите, я предполагал:

в одной колонке две полоски - одна работает за медведей, другая работает за быков.

Это возможно реализовать?

Files:
2_3.jpg  49 kb
 
shtopr:
Младен Спасибо за ответ!

простите, я предполагал:

в одной колонке две полоски - одна работает за медведей, другая работает за быков.

Это возможно реализовать?

It is possible but how are you going to know which one is which (which one is bears and which one is bulls) if they are going to change colors depending on their values? Or if they fall into same range of values (and the is quite possible with bulls and bears power values)?

 

быки всегда одного цвета, медведи всегда другого цвета, если встречаются - то наложение, третьего цвета, думаю так.

 
shtopr:
быки всегда одного цвета, медведи всегда другого цвета, если встречаются - то наложение, третьего цвета, думаю так.

Here is a version that uses one column. If you wish a third color, you need to add a new option

Files:
bb_1.gif  30 kb
 

Hi,

I have programmed an expert advisor which is running with an endless loop

int start()

{

while(IsStopped() && IsExpertEnabled( ))

{...}

}[/CODE]

when I backtest this ea I replaced the loop to

[CODE]int start()

{

if(1==1)

{...}

}

How can I change my code, to let my expert advisor in an endless loop in real, but also the strategietester works with?

 
sunshineh:
Hi,

I have programmed an expert advisor which is running with an endless loop

int start()

{

while(IsStopped() && IsExpertEnabled( ))

{...}

}[/CODE]

when I backtest this ea I replaced the loop to

[CODE]int start()

{

if(1==1)

{...}

}
How can I change my code, to let my expert advisor in an endless loop in real, but also the strategietester works with?

You can check the IsTesting() and if it is true do what you wish to allow in backtesting otherwise do the usual stuff

 
mladen:
here is a version that uses one column. If you wish a third color, you need to add a new option

спасибо за ответ.

проверил h1, m30, m15, m5, m1

по-прежнему работает только один цвет, красный.

Reason: