short duplicates buy array

Hi, couldn't find a topic to answer this one. I have a simple exploration:

Filter = 1;

Buy = 1;
Sell = 0;
Short = 0;
Cover = 0;

AddColumn(BarIndex(), "BarIndex");
AddColumn(Buy, "Buy");
AddColumn(Sell, "Sell");
AddColumn(Buy, "Short");
AddColumn(Sell, "Cover");
AddColumn(Close, "Close");

As you can see, Buy = 1, while Short is set to 0. Nonetheless, within the exploration results, Short will duplicate whatever value is assigned to Buy. This happens regardless of the Analysis settings ->General -> Positions = {Long, or Long & Short}. Checking/Unchecking "Allow same bar exit/entry", or "Reverse entry signal forces exit" won't change the behavior.

you have:
AddColumn(Buy, "Short");

when it should be:
AddColumn(Short, "Short");

same for Cover

1 Like

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.