Add capability to change bar colours in Strategy Wizard

Moderator: admin

Add capability to change bar colours in Strategy Wizard

Postby Jeffrey » Fri Sep 18, 2015 3:30 am

Hi.

1) It shall be very useful to have the capacity built into the Strategy Wizard, to change bar colours on certain Expressions/Activation Conditions being met.

Thanks.
Jeffrey
 
Posts: 2
Joined: Sat Sep 05, 2015 6:05 am

Re: Add capability to change bar colours in Strategy Wizard

Postby Cactus » Sat Jun 04, 2016 8:30 am

I agree.
How can I manipulate this, found in many indicators?
"open:setColor(period, Up)"

For example to make it Up = 1 and Down = 0, that would make it possible to write strategies with them in Wizard easily

I am trying to do the following:

When ALL of chosen indicators paint a red candle at the same time, show it in custom color#1
When ALL of chosen indicators paint a green candle at the same time, show it in custom color#2

FX Strategy Wizard doesn't allow for such changes unless it was a simple question of 1 = up and 0 = down or similar.

I found a changed haiken ashi file made for wizard to highlight direction changes as 1's and 0's so it's possible to manipulate but I don't understand code enough to adapt it with other indicators such as fibo candles and any overlays that paint red/green

Is there any plans to update FX Strategy Wizard btw? It is very powerful even now but the last change was in 2012?
Attachments
HA Alert for Wizard.lua
(2.55 KiB) Downloaded 803 times
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Add capability to change bar colours in Strategy Wizard

Postby Cactus » Sat Jun 04, 2016 3:56 pm

@Up

To be honest I have managed to achieve the desired result already. It is funny, right after I post for help I go on to try fix and learn about the problem and turns out I can do it. I have changed the following:
indicator:type(core.Oscillator);
from "Indicator"

And added

stream = instance:addStream("Line", core.Line, name .. ".line", "line", core.rgb(0, 0, 0), first)
in Prepare()

Then added
stream[period] = -1;
stream[period] = 1;

In Update()

And this solves my problem. The colors are visible in Wizard as "Line", with values 1 and -1. Now I can do the same for any indicator I need I hope.
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere


Return to Indicator Development

Who is online

Users browsing this forum: No registered users and 11 guests

cron