problems trying to build a robot
problems trying to build a robot
17 Apr 2018, 22:59
I am trying to build a robot based on the Better Volume Paint Bar indicator (/algos/indicators/show/912),
but I dont know how to associate, for example, when the indicator "paint red" buy and when "paint green" sell.
I try:
protected override void OnBar()
{
if(dataRedVolume[index] = MarketSeries.TickVolume[index]) //??
{
Close(TradeType.Sell);
Open(TradeType.Buy);
}
}
and I try too:
protected override void OnBar()
{
if (Value3 == HiValue3) //??
{
Close(TradeType.Buy);
Open(TradeType.Sell);
}
}
I hope to explain, thanks in advance.
Replies
felix.agabo
18 Apr 2018, 14:12
Thank you for your answer Panagiotis, but how could I get an output of the indicator that the bot recognized? What code could I use? I'm not very good at programming bots, I've only programmed indicators so far and a simple RSI bot.
@felix.agabo
PanagiotisCharalampous
18 Apr 2018, 15:36
Hi felix.agabo,
An idea would be to have some flags in the indicator that would indicate whether your conditions are met. However I cannot engage into programming this for you. If you need a professional assistance, I would advise you to contact a Consultant or post a Job for this.
Best Regards,
Panagiotis
@PanagiotisCharalampous
PanagiotisCharalampous
18 Apr 2018, 10:42
Hi felix.agabo,
I have had a brief look at the indicator, however it does not seem to explicitly provide this kind of output. You will probably need to tweak a bit the indicator to provide you with this information.
Best Regards,
Panagiotis
@PanagiotisCharalampous