How to refer to two BollingerBands in Multicharts while creating a signal? - MultiCharts | futures.io
futures.io futures trading
 

Go Back   futures.io

> Futures Trading, News, Charts and Platforms > Platforms and Indicators > MultiCharts


How to refer to two BollingerBands in Multicharts while creating a signal?
Started:October 21st, 2016 (07:42 AM) by milkysahai001 Views / Replies:159 / 8
Last Reply:November 2nd, 2016 (07:57 AM) 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 refer to two BollingerBands in Multicharts while creating a signal?

Old October 21st, 2016, 07:42 AM   #1 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts
Favorite Futures: Stock Futures
 
Posts: 25 since Sep 2016
Thanks: 9 given, 1 received

How to refer to two BollingerBands in Multicharts while creating a signal?

I want to create a signal using easylanguage. I need two Bollinger Bands with 1Std Dev and 2Std Dev, but I just can't seem to write the right code for it. I would be grateful for any help. Thanks.

Reply With Quote
     

Old October 21st, 2016, 07:58 AM   #2 (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,151 since Apr 2013
Thanks: 191 given, 648 received

milkysahai001,

post the code that it is giving you trouble and someone might be able to steer you in the right direction.
A good start would be to take a look at the build in Bollinger Band strategies or indicators. Then simply use the code that calls/operates the Bollinger Bands twice within your code - each with its own set of variables and inputs.

On a separate matter you might want to help @Big Mike in keeping the forum orderly by not creating double posts for the same problem :https://futures.io/tradestation/40737-how-refer-two-bollingerbands-while-creating-signal-using-easylanguage.html

Regards,

ABCTG

Reply With Quote
     
The following 2 users say Thank You to ABCTG for this post:
     

Old October 25th, 2016, 04:33 PM   #3 (permalink)
Elite Member
Miami Lakes
 
Futures Experience: Beginner
Platform: Multicharts
Broker/Data: Interactive Brokers
Favorite Futures: Emini ES
 
Posts: 18 since Oct 2016
Thanks: 2 given, 3 received



milkysahai001 View Post
I want to create a signal using easylanguage. I need two Bollinger Bands with 1Std Dev and 2Std Dev, but I just can't seem to write the right code for it. I would be grateful for any help. Thanks.

I just used this in another post now, I think you may find the answer here:

inputs:
Length( 20 ),
NumDevs( 2 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 );

UpperBand = BollingerBand( Close, Length, NumDevs );
LowerBand = BollingerBand( Close, Length, -NumDevs );

condition1 = CurrentBar > 1 and Close crosses over UpperBand;
if condition1 then

Buy ( "BB_LE" ) next bar at market;


condition2 = CurrentBar > 1 and Close crosses under LowerBand;
if condition2 then

Sell Short ( "BB_SE" ) next bar at market;


if (MarketPosition = 1) then
begin
if (Close crosses under UpperBand) then sell ("BB_LX") next bar at market;
end;

if (MarketPosition = -1) then
begin
if (Close crosses over LowerBand) then buytocover ("BB_SX") next bar at market;
end;

Reply With Quote
     
The following user says Thank You to alex20037 for this post:
     

Old November 2nd, 2016, 01:23 AM   #4 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts
Favorite Futures: Stock Futures
 
Posts: 25 since Sep 2016
Thanks: 9 given, 1 received


ABCTG View Post
milkysahai001,

post the code that it is giving you trouble and someone might be able to steer you in the right direction.
A good start would be to take a look at the build in Bollinger Band strategies or indicators. Then simply use the code that calls/operates the Bollinger Bands twice within your code - each with its own set of variables and inputs.

On a separate matter you might want to help @Big Mike in keeping the forum orderly by not creating double posts for the same problem

Regards,

ABCTG


Hi

Below is the code:

[IntrabarOrderGeneration = False]

Inputs:
Price(Close),Length(20),
BollingerPrice(Close),TestPriceUBand(Close),TestPriceLBand(Close),NumDevsUp(2),NumDevsDn(2),
BollingerBand1(Close),TestPriceLBand1 (Close),TestPriceUBand1(Close),NumDevsUp1(1),NumDevsDn1(1); ;

Variables:
var0(0),var1(0),var2(0),var3(0);

var0 = BollingerBand(BollingerPrice, Length, -NumDevsDn);
var1 = BollingerBand(BollingerPrice, Length, NumDevsUp);
var2 = BollingerBand(BollingerPrice, Length, -NumDevsDn1);
var3 = BollingerBand(BollingerPrice, Length, NumDevsUp1);

Condition1 = CurrentBar > 1 and
TestPriceLBand crosses above var0
and TestPriceLBand1 crosses below var2
and marketposition <> 1;
if condition1 then begin
Buy ( "L" ) next bar at var1 stop ;
end;

Condition2 = CurrentBar > 1 and
TestPriceUBand crosses below var1
and TestPriceUBand1 crosses above var3
and marketposition <>-1 ;
if condition1 then begin
Sell Short ( "S" ) next bar var1 stop ;
end;

i am a beginner so please be easy on the mistakes. Thanks.

Reply With Quote
     

Old November 2nd, 2016, 01:29 AM   #5 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts
Favorite Futures: Stock Futures
 
Posts: 25 since Sep 2016
Thanks: 9 given, 1 received

Futures Edge on FIO

alex20037 View Post
I just used this in another post now, I think you may find the answer here:

inputs:
Length( 20 ),
NumDevs( 2 ) ;
variables:
UpperBand( 0 ),
LowerBand( 0 );

UpperBand = BollingerBand( Close, Length, NumDevs );
LowerBand = BollingerBand( Close, Length, -NumDevs );

condition1 = CurrentBar > 1 and Close crosses over UpperBand;
if condition1 then

Buy ( "BB_LE" ) next bar at market;


condition2 = CurrentBar > 1 and Close crosses under LowerBand;
if condition2 then

Sell Short ( "BB_SE" ) next bar at market;


if (MarketPosition = 1) then
begin
if (Close crosses under UpperBand) then sell ("BB_LX") next bar at market;
end;

if (MarketPosition = -1) then
begin
if (Close crosses over LowerBand) then buytocover ("BB_SX") next bar at market;
end;

Hi

if i am not wrong, this is the default code available in multicharts. I tried to edit that to suit my purpose i.e. creating two BB but couldn't. thanks.

Reply With Quote
     

Old November 2nd, 2016, 05:30 AM   #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,151 since Apr 2013
Thanks: 191 given, 648 received

milkysahai001,

what is this code doing and what do you want it to do instead?

This might seem like a stupid question, but without knowing what you are trying to accomplish exactly it's hard/impossible to help you.

Regards,

ABCTG


milkysahai001 View Post
Hi

Below is the code:

[IntrabarOrderGeneration = False]

Inputs:
Price(Close),Length(20),
BollingerPrice(Close),TestPriceUBand(Close),TestPriceLBand(Close),NumDevsUp(2),NumDevsDn(2),
BollingerBand1(Close),TestPriceLBand1 (Close),TestPriceUBand1(Close),NumDevsUp1(1),NumDevsDn1(1); ;

Variables:
var0(0),var1(0),var2(0),var3(0);

var0 = BollingerBand(BollingerPrice, Length, -NumDevsDn);
var1 = BollingerBand(BollingerPrice, Length, NumDevsUp);
var2 = BollingerBand(BollingerPrice, Length, -NumDevsDn1);
var3 = BollingerBand(BollingerPrice, Length, NumDevsUp1);

Condition1 = CurrentBar > 1 and
TestPriceLBand crosses above var0
and TestPriceLBand1 crosses below var2
and marketposition <> 1;
if condition1 then begin
Buy ( "L" ) next bar at var1 stop ;
end;

Condition2 = CurrentBar > 1 and
TestPriceUBand crosses below var1
and TestPriceUBand1 crosses above var3
and marketposition <>-1 ;
if condition1 then begin
Sell Short ( "S" ) next bar var1 stop ;
end;

i am a beginner so please be easy on the mistakes. Thanks.


Reply With Quote
     

Old November 2nd, 2016, 07:24 AM   #7 (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,151 since Apr 2013
Thanks: 191 given, 648 received

milkysahai001,

think about it like this, you try to explain the exact rules that lead to an entry to someone who is not familiar with your system. After your explanation he/she should be able to trade it exactly like you do now.

The term "for trading between these ranges" might be too vague. When should the entry be triggered exactly, when would an exit be triggered etc..

TJ made some good points that are helpful in describing what a system should do in the official MC forum. Check them out, as they might help.

Regards,

ABCTG

Reply With Quote
     

Old November 2nd, 2016, 07:38 AM   #8 (permalink)
Trading Apprentice
Agra+India
 
Futures Experience: Beginner
Platform: MultiCharts
Favorite Futures: Stock Futures
 
Posts: 25 since Sep 2016
Thanks: 9 given, 1 received


ABCTG View Post
milkysahai001,

think about it like this, you try to explain the exact rules that lead to an entry to someone who is not familiar with your system. After your explanation he/she should be able to trade it exactly like you do now.

The term "for trading between these ranges" might be too vague. When should the entry be triggered exactly, when would an exit be triggered etc..



Regards,

ABCTG


ABCTG,

here is the system-

Indicator used:
Bollinger Bands1: 20 pd, Std Dev: 2, -2.
Bollinger Bands2: 20 pd, Std Dev: 1, -1.

Method:
Long- When Close goes beyond BB1 Lower Band then go long.
Long Exit- Stoploss-When low goes below BB2 lower band then exit long position.
Short- When Close goes above BB1 Higher Band then go short.
Short Exit- Stoploss- When high goes above BB2 higher band then exit short position.

this is the best explanation i can give about what i want with the system. the code is getting compiled but not giving any signals on the chart.

Reply With Quote
     

Old November 2nd, 2016, 07:57 AM   #9 (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,151 since Apr 2013
Thanks: 191 given, 648 received

milkysahai001,

I would suggest to start with fixing your entry. Check your entry conditions. Did you write them like you want them per your description or do you maybe check that both bollinger bands have to be crossed or something else maybe?

Regards,

ABCTG

Reply With Quote
     
The following user says Thank You to ABCTG for this post:
     

Reply



futures.io > Futures Trading, News, Charts and Platforms > Platforms and Indicators > MultiCharts > How to refer to two BollingerBands in Multicharts while creating a signal?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Trading Technologies: ADL hands-on

Dec 13

Normal webinar schedule resumes after the holidays

January

Ernie Chan: Risk Management

Elite only

Dedicated Trading Servers: Advantages/Disadvantages w/sam028

Elite only

An Afternoon with FIO member Massive I

Elite only

Leo Murphy: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Multicharts signal with two sets of parameters TraderWalrus MultiCharts 3 September 1st, 2016 06:49 AM
How to refer to a lagged ADX indicator? vanzolini EasyLanguage Programming 2 October 4th, 2015 05:58 AM
MultiCharts Webinar: Peter Campbell - Systematic Trading with MultiCharts MultiCharts MultiCharts 25 August 31st, 2015 09:32 PM
Easylanguage/Multicharts still buying next bar even no more code to buy signal! risaldeb MultiCharts 14 May 27th, 2015 10:56 AM
Why do some people refer to futures contracts as "cars"? shodson Traders Hideout 19 January 6th, 2010 02:55 PM


All times are GMT -4. The time now is 06:43 AM.

Copyright © 2016 by 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 2016-12-10 in 0.14 seconds with 19 queries on phoenix via your IP 54.166.37.177