Comment on Pi Bridge for Amibroker

bpr commented on 30 Jan 2015, 10:48 AM

Thanks a lot CHOKS.

After putting this I see it that it partially works. Meaning sometimes single order and sometimes multi orders are fired.

After debugging I see the barIndex () gives a same number most of the time but some times changes the number arbitrarily that causes this issues.

So I replaced checkTwo with a constant as anyways the barIndex is not working and the logic above urs is a workaround to that

//CheckTwo = LastValue(BarIndex(),1);
CheckTwo = 50; // a arbitrary constant

Now it is working except for cases where a signal comes back to back.

Because say previous candle has a sell signal and as soon as the current candle start the reset block runs but then when the current candle signal comes it will still go through the reset block thus multiple buy will be fired.

View the full comment thread »