MultiCharts MACD exit strategy - MultiCharts | futures io social day trading
futures io futures trading


MultiCharts MACD exit strategy
Updated: Views / Replies:1,280 / 2
Created: by bam2809 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
 

MultiCharts MACD exit strategy

  #1 (permalink)
Trading Apprentice
Cleveland Ohio
 
Futures Experience: Intermediate
Platform: Multicharts
Favorite Futures: Futures
 
Posts: 1 since Sep 2013
Thanks: 1 given, 0 received

MultiCharts MACD exit strategy

I have been trying to work out the exit strategy within my Multicharts MACD setup.

*******************************************************
inputs: FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ), myProtfitTarget(1),{Profit Target set at 1 tick}
myStopLoss(30); {30 ticks Stop Loss @ $10/tick/contact}

variables: var0( 0 ), var1( 0 ), var2( 0 ), PT (myProtfitTarget * TickSize {* BigPointValue}), SL (myStopLoss * TickSize {* BigPointValue}), OpenPosPL(0);

var0 = MACD( Close, FastLength, SlowLength ) ;
var1 = XAverage( var0, MACDLength ) ;
var2 = var0 - var1 ;



OpenPosPL = GetPositionOpenPL(GetSymbolName,GetAccountID);

condition1 = var2 crosses over 0;
condition2 = var2 crosses under 0;

if OpenPosPL{marketposition} = 0 then begin

if condition1 then begin
Buy ("bullish") 1 contract this bar on Close;
//Alert( "Bullish alert" )
//Sell ("Exit l3-c1 Target") 1 Contracts Next Bar At (entryprice + PT) Limit;
//Sell ("Exit l3-c1 Stop") 1 Contracts Next Bar At SL Stop;
SetStopContract;
SetStopLoss (300);
SetProfitTarget (10);

end;

if condition2 then begin
SellShort ("bearish") 1 contract this bar on Close;
//Alert( "Bearish alert" ) ;
//BuyToCover ("Exit l3-c1 Target") 1 Contracts Next Bar At (entryprice - PT) Limit;
//BuyToCover ("Exit l3-c1 Stop") 1 Contracts Next Bar At SL Stop;
SetStopContract;
SetStopLoss (300);
SetProfitTarget (10);

end;


*************************************

Here I have esablished the for SL $300 and PT $10. I want a way to check and see if I am flat. "if marketposition = 0 then begin" does not seem to work with "SetStopLoss" and "SetProfitTarget". It recognizes the initial conditions are met places a buy or sell order then the program gets lost. I have tried a variable using "GetPositionOpenPL" instead of "marketposition" in hope to achieve the same info as to whether or not I am flat. It works but the SL and PT an re not consistent and are not placed with every entry......Please help!

Reply With Quote
 
  #2 (permalink)
Elite Member
Netherlands
 
Futures Experience: Advanced
Platform: Ensign, Multicharts
Favorite Futures: SP500
 
Posts: 95 since Nov 2009
Thanks: 66 given, 56 received

didn't check the code in MC but just a first look,

didn't you forget and end; statement as there are 3 begins and 2 end; ???

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,524 since Apr 2013
Thanks: 229 given, 852 received
Forum Reputation: Legendary


Hi bam2809,

why do you do you place
 
Code
       SetStopContract;
	SetStopLoss (300);
	SetProfitTarget (10);
inside your condition checks? I must admit that I don't exactly understand what you are trying to do, but
if you use one instance of
 
Code
       SetStopContract;
	SetStopLoss (300);
	SetProfitTarget (10);
at the end of your code for example, MC should take care of the proper order management by itself.

Regards,
ABCTG


bam2809 View Post
I have been trying to work out the exit strategy within my Multicharts MACD setup.

*******************************************************
inputs: FastLength( 12 ), SlowLength( 26 ), MACDLength( 9 ), myProtfitTarget(1),{Profit Target set at 1 tick}
myStopLoss(30); {30 ticks Stop Loss @ $10/tick/contact}

variables: var0( 0 ), var1( 0 ), var2( 0 ), PT (myProtfitTarget * TickSize {* BigPointValue}), SL (myStopLoss * TickSize {* BigPointValue}), OpenPosPL(0);

var0 = MACD( Close, FastLength, SlowLength ) ;
var1 = XAverage( var0, MACDLength ) ;
var2 = var0 - var1 ;



OpenPosPL = GetPositionOpenPL(GetSymbolName,GetAccountID);

condition1 = var2 crosses over 0;
condition2 = var2 crosses under 0;

if OpenPosPL{marketposition} = 0 then begin

if condition1 then begin
Buy ("bullish") 1 contract this bar on Close;
//Alert( "Bullish alert" )
//Sell ("Exit l3-c1 Target") 1 Contracts Next Bar At (entryprice + PT) Limit;
//Sell ("Exit l3-c1 Stop") 1 Contracts Next Bar At SL Stop;
SetStopContract;
SetStopLoss (300);
SetProfitTarget (10);

end;

if condition2 then begin
SellShort ("bearish") 1 contract this bar on Close;
//Alert( "Bearish alert" ) ;
//BuyToCover ("Exit l3-c1 Target") 1 Contracts Next Bar At (entryprice - PT) Limit;
//BuyToCover ("Exit l3-c1 Stop") 1 Contracts Next Bar At SL Stop;
SetStopContract;
SetStopLoss (300);
SetProfitTarget (10);

end;


*************************************

Here I have esablished the for SL $300 and PT $10. I want a way to check and see if I am flat. "if marketposition = 0 then begin" does not seem to work with "SetStopLoss" and "SetProfitTarget". It recognizes the initial conditions are met places a buy or sell order then the program gets lost. I have tried a variable using "GetPositionOpenPL" instead of "marketposition" in hope to achieve the same info as to whether or not I am flat. It works but the SL and PT an re not consistent and are not placed with every entry......Please help!


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

Reply



futures io > > > > MultiCharts MACD exit strategy

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
I am at my witts end, simple MACD Cross over strategy tomlryde Sierra Chart Programming 11 September 8th, 2013 06:50 PM
Strategy Entry/Exit Visualization zeller4 NinjaTrader Programming 6 November 8th, 2012 11:22 AM
Exit Only Strategy ? buylosellhi MultiCharts 6 November 15th, 2011 09:38 PM
need arrows for Multicharts- ADXVMA, SMI, zerolag MACD emini_Holy_Grail EasyLanguage Programming 1 January 17th, 2011 12:16 PM
Looking for a simple MACD strategy. MACD Xover LONG, go LONG roshareid NinjaTrader Programming 2 April 11th, 2010 09:05 PM


All times are GMT -4. The time now is 02:17 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-12-11 in 0.08 seconds with 19 queries on phoenix via your IP 54.226.34.209