Topics
Replies

peetman23
15 May 2020, 16:29

RE:

PanagiotisCharalampous said:

Hi peetman23,

You need to change 

 public Indicator pvto;

to

 public PriceVolumeTrend_Optimized pvto;

and

            // Put your core logic here
            if (pvto(LastResult) < -9)
            {
                Close(TradeType.Sell);
                Open(TradeType.Buy);
            }
            else if (pvto(LastResult) > 9)
            {
                Close(TradeType.Buy);
                Open(TradeType.Sell);
            }

to

            // Put your core logic here
            if (pvto.PVTO.LastValue < -9)
            {
                Close(TradeType.Sell);
                Open(TradeType.Buy);
            }
            else if (pvto.PVTO.LastValue > 9)
            {
                Close(TradeType.Buy);
                Open(TradeType.Sell);
            }

for the cBot to build. 

Best Regards,

Panagiotis 

Join us on Telegram

 

 

Thank you. I was able to build the cBot, but when I try to backtest it throws the following:
Crashed in OnTick with NullReferenceException: Object reference not set to an instance of an object.


@peetman23

peetman23
15 May 2020, 11:01

RE:

PanagiotisCharalampous said:

Hi peetman23,

Can you please post the complete cBot code as well as the indicator code so that we can reproduce this issue?

Best Regards,

Panagiotis 

Join us on Telegram

 

Hi Panagiotis,

I've updated the initial post.


@peetman23