Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
How to create Market order for Bollinger Band SE and LE
I'm struggling to rewrite the defaults Bollinger Band SE LE signal. I want enter and exit based on market order. I tried something like below. I changed private IOrderMarket m_BBandLE; AND m_BBandLE = OrderCreator.MarketNextBar (new SOrderParameters(Contracts.Default, "BBandLE", EOrderAction.Buy)); as you see below. I'm getting getting an error.
using System;
namespace PowerLanguage.Strategy
{
public class Bollinger_Bands_LE : SignalObject
{
private IOrderMarket m_BBandLE;
take a look at the MC.NET programming guide. Besides explaining how to operate the different order types, you can likely use the code snippet in section 2.2. and adapt it to your needs.
you are trying to send the value of the bollinger band as quantity of a market order. You can for example issue the order without specifying a quantity and have MC use the default one as specified in your workspace.