Need help with a profitable automated trading strategy - MultiCharts | futures io social day trading
futures io futures trading


Need help with a profitable automated trading strategy
Updated: Views / Replies:3,951 / 41
Created: by hoang101483 Attachments:2

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 100,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
 2  
 
Thread Tools Search this Thread
 

Need help with a profitable automated trading strategy

  #31 (permalink)
Miami Lakes
 
Trading Experience: Beginner
Platform: Multicharts
Broker/Data: Interactive Brokers
Favorite Futures: Emini ES
 
Posts: 19 since Oct 2016
Thanks: 2 given, 3 received


hoang101483 View Post
It said build suceeded, but still have that RED icon next two the signal icon list. does it works on your computer? Perhaps I need to reboot mine?

It works for me just fine. See attached, you should be able to unzip and import it to your Multicharts.NET. I have the latest version.

Attached Files
Register to download File Type: zip BB.zip (2.2 KB, 5 views)
Reply With Quote
 
  #32 (permalink)
Oklahoma City USA
 
 
Posts: 47 since Oct 2016
Thanks: 0 given, 1 received


alex20037 View Post
It works for me just fine. See attached, you should be able to unzip and import it to your Multicharts.NET. I have the latest version.

Thanks Alex,

It is working now. One small issue. If you open the default BB LE and SE it will basically reverse at each signal. Can we do exactly that?

Your code basically have entry long, exit long and vice versa instead of reversal at each signal. If you add the signal to the chart, you will see what I'm talking about. I wonder if you code each signal on a separate file would fix this issue. Let me know if you can fix this.


Last edited by hoang101483; October 25th, 2016 at 10:39 PM.
Reply With Quote
 
  #33 (permalink)
Miami Lakes
 
Trading Experience: Beginner
Platform: Multicharts
Broker/Data: Interactive Brokers
Favorite Futures: Emini ES
 
Posts: 19 since Oct 2016
Thanks: 2 given, 3 received



hoang101483 View Post
Thanks Alex,

It is working now. One small issue. If you open the default BB LE and SE it will basically reverse at each signal. Can we do exactly that?

Your code basically have entry long, exit long and vice versa instead of reversal at each signal. If you add the signal to the chart, you will see what I'm talking about. I wonder if you code each signal on a separate file would fix this issue. Let me know if you can fix this.

See attached now. I can't get it to actually show the reverse in the chart, show 2 contracts instead of 1, that'll be something to look into later on when we have good numbers. But you can see that it is doing it, if you see the performance report for example. So if it is long one contract it sells it and short sells a second one, if it is short then it covers it and then buys another one.

Attached Files
Register to download File Type: zip BBv2.zip (2.3 KB, 7 views)
Reply With Quote
 
  #34 (permalink)
Oklahoma City USA
 
 
Posts: 47 since Oct 2016
Thanks: 0 given, 1 received

Alex,

thanks for that. i think you misunderstood me. you see how the default bb has LE and SE. what we can do is spliting up the BB file into two file. one foe LE LX, another for SE and SX. this way we have perfect reversal I hope. let me know if you can do it

Reply With Quote
 
  #35 (permalink)
Miami Lakes
 
Trading Experience: Beginner
Platform: Multicharts
Broker/Data: Interactive Brokers
Favorite Futures: Emini ES
 
Posts: 19 since Oct 2016
Thanks: 2 given, 3 received


hoang101483 View Post
Alex,

thanks for that. i think you misunderstood me. you see how the default bb has LE and SE. what we can do is spliting up the BB file into two file. one foe LE LX, another for SE and SX. this way we have perfect reversal I hope. let me know if you can do it

Splitting in two files won't make a difference, code is still the same. I will look into it when I have a chance, however this is for sure doing now what we want to, see the strategy performance report please, it does reverse, only doesn't show in the chart.
I was looking and also the you see how the default bb LE and SE that come with multicharts also behave like this, they do reverse, but the chart only shows the new open order.

Reply With Quote
 
  #36 (permalink)
Oklahoma City USA
 
 
Posts: 47 since Oct 2016
Thanks: 0 given, 1 received

Alex,

I got it to work. Here is the code

using System;

namespace PowerLanguage.Strategy
{
public class BB : SignalObject
{
private IOrderMarket m_BBandLE;
private IOrderMarket m_BBandLX;
private IOrderMarket m_BBandSE;
private IOrderMarket m_BBandSX;

public BB(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;
private VariableSeries<double> m_UpperBand;

protected override void Create()
{
m_LowerBand = new VariableSeries<Double>(this);
m_UpperBand = new VariableSeries<Double>(this);
m_BBandLE = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandLE", EOrderAction.Buy));
m_BBandLX = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandLX", EOrderAction.SellShort));
m_BBandSE = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandSE", EOrderAction.SellShort));
m_BBandSX = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandSX", EOrderAction.Buy));
}

protected override void CalcBar()
{
m_LowerBand.Value = Bars.Close.BollingerBandCustom(Length, -NumDevsDn);
m_UpperBand.Value = Bars.Close.BollingerBandCustom(Length, NumDevsDn);

if (CurrentPosition.Value == 0) {
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandLE.Send();
if (Bars.CurrentBar > 1 && Bars.Close.CrossesUnder(m_UpperBand, ExecInfo.MaxBarsBack))
m_BBandSE.Send();
}

if (CurrentPosition.Value > 0) {
if (Bars.CurrentBar > 1 && Bars.Close.CrossesUnder(m_UpperBand, ExecInfo.MaxBarsBack))
m_BBandLX.Send();
}
if (CurrentPosition.Value < 0) {
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandSX.Send();
}

}
}
}

Reply With Quote
 
  #37 (permalink)
Miami Lakes
 
Trading Experience: Beginner
Platform: Multicharts
Broker/Data: Interactive Brokers
Favorite Futures: Emini ES
 
Posts: 19 since Oct 2016
Thanks: 2 given, 3 received

I guess now the question is, how do we make this profitable long term?

Reply With Quote
 
  #38 (permalink)
Oklahoma City USA
 
 
Posts: 47 since Oct 2016
Thanks: 0 given, 1 received

argh. never mind. It did create a double order. so That code didn't work

Reply With Quote
 
  #39 (permalink)
Oklahoma City USA
 
 
Posts: 47 since Oct 2016
Thanks: 0 given, 1 received

Alex,

I think the issue is somewhere here.

protected override void CalcBar()
{
m_LowerBand.Value = Bars.Close.BollingerBandCustom(Length, -NumDevsDn);
m_UpperBand.Value = Bars.Close.BollingerBandCustom(Length, NumDevsDn);

if (CurrentPosition.Value == 0) {
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandLE.Send();
if (Bars.CurrentBar > 1 && Bars.Close.CrossesUnder(m_UpperBand, ExecInfo.MaxBarsBack))
m_BBandSE.Send();
}

if (CurrentPosition.Value > 0) {
if (Bars.CurrentBar > 1 && Bars.Close.CrossesUnder(m_UpperBand, ExecInfo.MaxBarsBack))
m_BBandLX.Send();
}
if (CurrentPosition.Value < 0) {
if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandSX.Send();
}

}
}
}

Reply With Quote
 
  #40 (permalink)
Oklahoma City USA
 
 
Posts: 47 since Oct 2016
Thanks: 0 given, 1 received


I think I might have fixed the issue by getting rid of the position argument all together

using System;

namespace PowerLanguage.Strategy
{
public class BB : SignalObject
{
private IOrderMarket m_BBandLE;
private IOrderMarket m_BBandLX;
private IOrderMarket m_BBandSE;
private IOrderMarket m_BBandSX;

public BB(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;
private VariableSeries<double> m_UpperBand;

protected override void Create()
{
m_LowerBand = new VariableSeries<Double>(this);
m_UpperBand = new VariableSeries<Double>(this);
m_BBandLE = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandLE", EOrderAction.Buy));
m_BBandLX = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandLX", EOrderAction.SellShort));
m_BBandSE = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandSE", EOrderAction.Sell));
m_BBandSX = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandSX", EOrderAction.BuyToCover));
}

protected override void CalcBar()
{
m_LowerBand.Value = Bars.Close.BollingerBandCustom(Length, -NumDevsDn);
m_UpperBand.Value = Bars.Close.BollingerBandCustom(Length, NumDevsDn);


if (Bars.CurrentBar > 1 && Bars.Close.CrossesOver(m_LowerBand, ExecInfo.MaxBarsBack))
m_BBandLE.Send();
if (Bars.CurrentBar > 1 && Bars.Close.CrossesUnder(m_UpperBand, ExecInfo.MaxBarsBack))
m_BBandSE.Send();
if (Bars.CurrentBar > 1 && Bars.Close.CrossesUnder(m_UpperBand, ExecInfo.MaxBarsBack))
m_BBandLX.Send();
if (Bars.CurrentBar > 1 && Bars.Close.CrossesUnder(m_UpperBand, ExecInfo.MaxBarsBack))
m_BBandLX.Send();
}



}
}

Reply With Quote

Reply



futures io > > > > Need help with a profitable automated trading strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Webinar: The Seven Most Effective Trading Setups w/Peter Davies @ Jigsaw

Oct 17
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Building a PC for Discretionary/Automated Trading and Strategy Development nlhaines Tech Support 50 January 13th, 2017 05:18 PM
Creating a successful automated trading strategy Big Mike Elite Automated Trading 69 December 27th, 2016 05:32 PM
How can a strategy be profitable when backtested but not when actually used? sra18376 NinjaTrader 27 July 14th, 2014 09:48 PM
Automated trading strategy based on an alert dom64 NinjaTrader 0 February 28th, 2013 06:46 AM
ATW DPTL in automated trading strategy Accumulator NinjaTrader Programming 12 January 11th, 2010 12:17 AM


All times are GMT -4. The time now is 06:47 PM. (this page content is cached, log in for real-time version)

Copyright © 2019 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