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:2,474 / 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 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
 2  
 
Thread Tools Search this Thread
 

Need help with a profitable automated trading strategy

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


alex20037 View Post
I think this is what you are looking for:


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;


However, I don't think it can profitable with such simple rules, in any timeframe. It would be too easy.



Thank you. can this code be applied to PowerLanguage on the Multichart .NET?

I tried but it failed.

Reply With Quote
 
  #22 (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 code doesn't seem to work with PowerLanguage Editor. I tried to added as Signals using C# and VB#NET but both failed. Can you tell me what I'm doing wrong here?

Reply With Quote
 
  #23 (permalink)
Elite Member
Miami Lakes
 
Futures 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
Thank you. can this code be applied to PowerLanguage on the Multichart .NET?

I tried but it failed.

This is for Multicharts

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


alex20037 View Post
This is for Multicharts

Alex, Can you code this in PowerLanguage?

I will return your favor with copy of my profitable strategy

Reply With Quote
 
  #25 (permalink)
Elite Member
Milan (Italy)
 
Futures Experience: Advanced
Platform: TradeStation, MC, TWS
Broker/Data: TradeStation, IB
Favorite Futures: Futures, Forex
 
tradingest's Avatar
 
Posts: 96 since Dec 2014
Thanks: 5 given, 9 received


hoang101483 View Post
Alex, Can you code this in PowerLanguage?

The code offered by Alex is power language. You have need the C# code to run the strategy in .NET platform

Sent using the futures.io mobile app

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


tradingest View Post
The code offered by Alex is power language. You have need the C# code to run the strategy in .NET platform

Sent using the futures.io mobile app

Tradingest,

Thanks for the clarification. The editor named powerlanguage so I thought that what it is. Great to know.

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

I was able to get the code kinda work. But need further refinement. You can find the thread here. Can you help?
https://futures.io/multicharts/40758-how-create-market-order-bollinger-band-se-le.html

Reply With Quote
 
  #28 (permalink)
Elite Member
Miami Lakes
 
Futures 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
Tradingest,

Thanks for the clarification. The editor named powerlanguage so I thought that what it is. Great to know.

No problem here is the code in C# . I am really interested in seeing how you can get this strategy to work, please do share the results with me.



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.Sell));
m_BBandSE = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "BBandSE", EOrderAction.SellShort));
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 (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
 
  #29 (permalink)
Trading Apprentice
Oklahoma City USA
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: ES
 
Posts: 44 since Oct 2016
Thanks: 0 given, 1 received

Thanks Alex,

I compiled it, didn't give back an error, but It still show Unverified.

Can you double check the code to see if we missing anything?

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


It said build suceeded, but still have that RED icon next to the signal icon on the list on the left hand. does it work on your computer? Perhaps I need to reboot mine?

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)

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

Dec 7

Linda Bradford Raschke: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

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 06:18 PM
Creating a successful automated trading strategy Big Mike Elite Automated Trading 69 December 27th, 2016 06:32 PM
How can a strategy be profitable when backtested but not when actually used? sra18376 NinjaTrader 27 July 14th, 2014 10:48 PM
Automated trading strategy based on an alert dom64 NinjaTrader 0 February 28th, 2013 07:46 AM
ATW DPTL in automated trading strategy Accumulator NinjaTrader Programming 12 January 11th, 2010 01:17 AM


All times are GMT -4. The time now is 03:41 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-11-25 in 0.12 seconds with 20 queries on phoenix via your IP 54.198.134.32