How to create Market order for Bollinger Band SE and LE - MultiCharts | futures.io
futures io futures trading


How to create Market order for Bollinger Band SE and LE
Started: by hoang101483 Views / Replies:362 / 12
Last Reply: Attachments:0

Welcome to futures io.

Welcome, Guest!

This forum was established to help traders (especially futures traders) by openly sharing indicators, strategies, methods, trading journals and discussing the psychology of trading.

We are fundamentally different than most other trading forums:
  • We work extremely hard to keep things positive on our forums.
  • We do not tolerate rude behavior, trolling, or vendor advertising in posts.
  • We firmly believe in openness and encourage sharing. The holy grail is within you, it is not something tangible you can download.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.


You'll need to register in order to view the content of the threads and start contributing to our community. It's free and simple, and we will never resell your private information.

-- Big Mike

Reply
 
Thread Tools Search this Thread
 

How to create Market order for Bollinger Band SE and LE

  #1 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received

How to create Market order for Bollinger Band SE and LE

Hi all,

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;

public Bollinger_Bands_LE(object ctx) :
base(ctx)
{
Length = 20;
NumDevsDn = 2;
}

[Input]
public int Length { get; set; }

[Input]
public double NumDevsDn { get; set; }

private VariableSeries<double> m_LowerBand;

protected override void Create()
{
m_LowerBand = new VariableSeries<Double>(this);
m_BBandLE = OrderCreator.Stop(new SOrderParameters(Contracts.Default, "BBandLE", EOrderAction.Buy));
}

protected override void CalcBar()
{
m_LowerBand.Value = Bars.Close.BollingerBandCustom(Length, -NumDevsDn);
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandLE.Send(m_LowerBand.Value);
}
}
}

Reply With Quote
 
  #2 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received

This is the error I'm getting

https://snag.gy/KyavZo.jpg

Reply With Quote
 
  #3 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received


hoang101483,

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.

Regards,

ABCTG

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received


ABCTG View Post
hoang101483,

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.

Regards,

ABCTG

ABCTG,

Thanks for for the link. I tried to modify it but still getting the same error. Something is wrong with this part. Can you help me?

m_LowerBand.Value = Bars.Close.BollingerBandCustom(Length, -NumDevsDn);
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandLE.Send(m_LowerBand.Value);

Reply With Quote
 
  #5 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received

Futures Edge on FIO

Which time slot for our live webinar events works best for you?

 

hoang101483 View Post
ABCTG,

Thanks for for the link. I tried to modify it but still getting the same error. Something is wrong with this part. Can you help me?

m_LowerBand.Value = Bars.Close.BollingerBandCustom(Length, -NumDevsDn);
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandLE.Send(m_LowerBand.Value);

It is saying can not double to init.... Can you tell me how to fix it?

Reply With Quote
 
  #6 (permalink)
 Vendor: abctradinggroup.com 
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,234 since Apr 2013
Thanks: 199 given, 694 received

hoang101483,

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.

Regards,

ABCTG

Reply With Quote
 
  #7 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received


ABCTG View Post
hoang101483,

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.

Regards,

ABCTG

Can you just tell me how to fix it. I'm not very good with coding. I tried this. But failed.

m_HigherBand.Value = Bars.Close.BollingerBandCustom(Length, NumDevsUp);
if ( Bars.Close.CrossesUnder(m_HigherBand, ExecInfo.MaxBarsBack))
m_BBandSE.Send(m_HigherBand.Value);

Reply With Quote
 
  #8 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received


hoang101483 View Post
Can you just tell me how to fix it. I'm not very good with coding. I tried this. But failed.

m_HigherBand.Value = Bars.Close.BollingerBandCustom(Length, NumDevsUp);
if ( Bars.Close.CrossesUnder(m_HigherBand, ExecInfo.MaxBarsBack))
m_BBandSE.Send(m_HigherBand.Value);

This is what I have currently. which line do I need to fix?

using System;

namespace PowerLanguage.Strategy
{
public class Bollinger_Bands_LE : SignalObject
{
private IOrderMarket m_BBandLE;

public Bollinger_Bands_LE(object ctx) :
base(ctx)
{
Length = 10;
NumDevsDn = 1;
}

[Input]
public int Length { get; set; }

[Input]
public double NumDevsDn { get; set; }

private VariableSeries<double> m_LowerBand;

protected override void Create()
{
m_LowerBand = new VariableSeries<Double>(this);
m_BBandLE = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandLE", EOrderAction.Buy));
}

protected override void CalcBar()
{
m_LowerBand.Value = Bars.Close.BollingerBandCustom(Length, -NumDevsDn);
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandLE.Send(m_LowerBand.Value);
}
}
}

Reply With Quote
 
  #9 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received

ABCTG,

Please Please help me. tI would a lot to me if I can automate this strategy

Reply With Quote
 
  #10 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 39 since Oct 2016
Thanks: 0 given, 0 received


Pump. Would someone please help me !

Reply With Quote

Reply



futures io > > > > How to create Market order for Bollinger Band SE and LE

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)
 

NinjaTrader 8: Tips and Tricks (part 2)

Mar 2
 

An Afternoon With FIO member @michaelleemoore

Elite only
 

Jigsaw Trading: Keys to successfully trading the open

Mar 9

Macro view: Trump Market Risk w/Piers Curran @ Amplify Trading

Elite only

Reading the Psychology of the Market w/Brett Steenbarger & Trading Technologies

Elite only

Hybrid Machine Learning (R and TradeStation) w/Murray Ruggiero

Elite only

Spring Grains Outlook w/Sean Lusk @ Walsh Trading

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Bollinger Band in the Market Analyzer? chrille NinjaTrader 0 March 10th, 2016 05:51 AM
Bollinger Band Price Markers Only stockgoblin NinjaTrader 8 March 22nd, 2014 04:36 PM
(Request) Bollinger Band and %B aseemmv23 AmiBroker 2 August 28th, 2013 08:13 AM
Bollinger Band settings? Joseph689 NinjaTrader 3 March 17th, 2013 01:03 PM
CCI bollinger band booker777 NinjaTrader 1 September 10th, 2012 04:25 AM


All times are GMT -4. The time now is 03:09 PM.

no new posts
Page generated 2017-02-26 in 0.12 seconds with 19 queries on phoenix via your IP 54.204.130.94