+1 888 340 6572
MultiCharts Project Management
Go to the previous open issue
Go to the previous issue (open or closed)
Please log in to bookmark issues
Open Bug report MC-2493 » Closed Bug report MC-2492

.NET 11 PortfolioTrader with a FlipFlop strategy fails to execute on 1minute bars (regardless of the source)

Go to the next issue (open or closed)
Go to the next open issue
icon_info.png This issue has been closed with status "Duplicated" and resolution "Not determined".

Set following strategy:

using System;
using System.Drawing;
using System.Linq;
using PowerLanguage.Function;
using ATCenterProxy.interop;

namespace PowerLanguage.Strategy {
public class FlipFlop : SignalObject {
public FlipFlop(object _ctx):base(_ctx){}
private IOrderMarket buy_order, short_order;
private int lastSignal;
protected override void Create() {
// create variable objects, function objects, order objects etc.
buy_order = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, EOrderAction.Buy));
short_order = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, EOrderAction.SellShort));
lastSignal = 0;
protected override void StartCalc() {
// assign inputs
protected override void CalcBar(){
// strategy logic
if(/*CurrentPosition.Side == EMarketPositionSide.Flat && */(lastSignal != 1)){
lastSignal = 1;
} else if(/*CurrentPosition.Side == EMarketPositionSide.Flat && */(lastSignal != -1))
lastSignal = -1;
}else {

It is designed to enter sequentially long then short. And it works on any 1 minute chart.
Set a Portfolio Trader in .NET (tried on latest 11.0) with 10 futures symbols set on 1 minute (data source=IQFeed) on a Paper Trader account.
Add our above FlipFlop strategy.
Hit the Automate Order Execution button. Surprise: nothing happens ... no orders, no nothing.

With such behavior how can we trust Portfolio Trader with live brokerage accounts ... one wonders.


Steps to reproduce this issue

see above

Comments (0)
There are no comments
Issue basics
  • Type of issue
    Bug report
  • Category
    Not determined
  • Targeted for
    Not determined
  • Status
  • Priority
    Not determined
User pain
  • Type of bug
    Not triaged
  • Likelihood
    Not triaged
  • Effect
    Not triaged
Affected by this issue (0)
There are no items
People involved
Times and dates
  • Posted at
  • Last updated
Issue details
  • Reproducability
    Not determined
Attachments (0)
There is nothing attached to this issue
Commits (0)
There are no code checkins for this issue
Duplicate issues (0)
This issue does not have any duplicates