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


How to create Market order for Bollinger Band SE and LE
Updated: Views / Replies:667 / 12
Created: by hoang101483 Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • 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.

-- Big Mike, Site Administrator

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: 44 since Oct 2016
Thanks: 0 given, 1 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: 44 since Oct 2016
Thanks: 0 given, 1 received

This is the error I'm getting

https://snag.gy/KyavZo.jpg

Reply With Quote
 
  #3 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,455 since Apr 2013
Thanks: 222 given, 830 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: 44 since Oct 2016
Thanks: 0 given, 1 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: 44 since Oct 2016
Thanks: 0 given, 1 received


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)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,455 since Apr 2013
Thanks: 222 given, 830 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: 44 since Oct 2016
Thanks: 0 given, 1 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: 44 since Oct 2016
Thanks: 0 given, 1 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: 44 since Oct 2016
Thanks: 0 given, 1 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: 44 since Oct 2016
Thanks: 0 given, 1 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)
 

Alternative Views on Traditional Tools w/Rhonda Jones

Elite only

FuturesTrader71: TBA

Elite only

Al Brooks: TBA

Elite only

Jigsaw Trading: TBA

Oct 19

RandBots: TBA

Oct 24
     

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


All times are GMT -4. The time now is 02:50 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-09-21 in 0.13 seconds with 20 queries on phoenix via your IP 54.225.54.120