+1 888 340 6572 GET STARTED
MultiCharts Project Management
previous_open_issue.png
Go to the previous open issue
previous_issue.png
Go to the previous issue (open or closed)
star_faded.png
Please log in to bookmark issues
bug_report_small.png
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)

action_vote_minus_faded.png
0
Votes
action_vote_plus_faded.png
next_issue.png
Go to the next issue (open or closed)
next_open_issue.png
Go to the next open issue
icon_info.png This issue has been closed with status "Duplicated" and resolution "Not determined".
Description

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)){
buy_order.Send();
lastSignal = 1;
} else if(/*CurrentPosition.Side == EMarketPositionSide.Flat && */(lastSignal != -1))
{
short_order.Send();
lastSignal = -1;
}else {
//this.GenerateExitOnClose();
}
}
}
}

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.

Thanks

Steps to reproduce this issue

see above

Comments (0)
There are no comments
History
Issue basics
  • Type of issue
    Bug report
  • Category
    Not determined
  • Targeted for
    Not determined
  • Status
    Duplicated
  • 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