MultiChart MA In Easy Language not tying back - MultiCharts | futures io social day trading
futures io futures trading


MultiChart MA In Easy Language not tying back
Updated: Views / Replies:1,244 / 11
Created: by jeremysy Attachments:1

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
 1  
 
Thread Tools Search this Thread
 

MultiChart MA In Easy Language not tying back

  #1 (permalink)
Trading Apprentice
Toronto
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: Stocks
 
Posts: 7 since Aug 2013
Thanks: 3 given, 0 received

MultiChart MA In Easy Language not tying back

Hi There,

My code below trades based on EMA crosses. When I plot the EMA from the strategy onto the chart the 34 ema doesn't look the same as the 34 ema that is built into MultiCharts under the drawings. Is there something wrong with my code?

Inputs: Price (Close),
Length1(2),
Length2(8),
Length3(34),
Cts (1);

Vars: ExpAv1(0),
ExpAv2(0),
ExpAv3(0);

ExpAv1 = XAverage (Price,Length1);
ExpAv2 = XAverage (Price,Length2);
ExpAv3 = XAverage (Price,Length3);
{Buy or short sell contracts at exponential average crossovers}

If ExpAv1[1] Crosses Above ExpAv2[1] and ExpAv1 > ExpAv2 then
begin
Buy ("Buy")Cts shares next bar at market ;
End;


if Close[1] <= ExpAv2[1] and marketposition>0 then
begin
sell ("Stop Loss")Cts shares next bar at market ;
End;


if Close[1] >= ExpAv3[1] and marketposition>0 then
begin
sell ("Target")Cts shares next bar at market ;
End;


//setstoploss (ExpAv2);
//setprofittarget(ExpAv3);

{If ExpAv1[1] crosses Below ExpAv2[1] and ExpAv1 < ExpAv2 then
begin
sellshort ("ShortSale")CTS shares next bar at market;
End;


setstoploss(ExpAv2) ;
setprofittarget(ExpAv3);}



value97 = text_new(D,T,ExpAv1,"*");
text_SetColor(Value97,CYAN);

value98 = text_new(D,T,ExpAv2,"*");
text_SetColor(Value98,Red);

value99 = text_new(D,T,ExpAv3,"*");
text_SetColor(Value99,Green);

Reply With Quote
 
  #2 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary

They should be the same functions, but remember that exp avg theoretically includes ALL previous data. So, if your starting points for calculation are different, you will get different results in ema calculations.

I suggest printing out the values in both MC and TS, and then it might be easier to debug.

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #3 (permalink)
Trading Apprentice
Toronto
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: Stocks
 
Posts: 7 since Aug 2013
Thanks: 3 given, 0 received


How do I tell it to calculate on more data? I pulled in 80 days and told it to use 50 bars and it is still only running on only 20 bars.

Reply With Quote
 
  #4 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary


jeremysy View Post
How do I tell it to calculate on more data? I pulled in 80 days and told it to use 50 bars and it is still only running on only 20 bars.

My bad, I thought you were comparing Tradestation and Multicharts results. It sounds like you are comparing Multicharts Analysis (Plot) with Multicharts Strategies.

I do not use MC, but maybe showing you how Tradestation does it will help...

In Tradestation, if you go to Format Analysis technique, you can adjust the number of bars a study references.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #5 (permalink)
Trading Apprentice
Toronto
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: Stocks
 
Posts: 7 since Aug 2013
Thanks: 3 given, 0 received

Your first reply helped me figure it out actually. I changed the max bars back and it worked out. You know anything about candlestick trading? I'm trying to add bullish engulfings as a requirement for entry in this strategy any ideas?

Reply With Quote
 
  #6 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary


jeremysy View Post
Your first reply helped me figure it out actually. I changed the max bars back and it worked out. You know anything about candlestick trading? I'm trying to add bullish engulfings as a requirement for entry in this strategy any ideas?

The bull/bear engulf code I have I did not write, so I can't post it here. Does MC possibly have an engulfing function built in?

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #7 (permalink)
Trading Apprentice
Toronto
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: Stocks
 
Posts: 7 since Aug 2013
Thanks: 3 given, 0 received

It does but I can't figure out how to use it in my code. The code for the engulfing function is :

Inputs: Len(Numeric);
condition1 = Average(Close, Len) < Average(Close, Len)[1] AND Close > Open AND Close[1] < Open[1]
AND Close > Open[1] AND Open < Close[1];
If condition1 Then
BullishEngulfing = True
Else
BullishEngulfing = False;

Reply With Quote
 
  #8 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary


jeremysy View Post
It does but I can't figure out how to use it in my code. The code for the engulfing function is :

Inputs: Len(Numeric);
condition1 = Average(Close, Len) < Average(Close, Len)[1] AND Close > Open AND Close[1] < Open[1]
AND Close > Open[1] AND Open < Close[1];
If condition1 Then
BullishEngulfing = True
Else
BullishEngulfing = False;


So stick the above calcs earlier in your code. Then, when you get to order placement part of code:

"If ExpAv1[1] Crosses Above ExpAv2[1] and ExpAv1 > ExpAv2 then "

change it to this if you want to go long only when bull eng is true

If ExpAv1[1] Crosses Above ExpAv2[1] and ExpAv1 > ExpAv2 and BullishEngulfing=True then

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote
 
  #9 (permalink)
Trading Apprentice
Toronto
 
Futures Experience: Advanced
Platform: MultiCharts
Favorite Futures: Stocks
 
Posts: 7 since Aug 2013
Thanks: 3 given, 0 received

For some reason that doesn't work. I was trying that and it gives me a "Casual Study: (Function)" errror

Reply With Quote
 
  #10 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Futures Experience: Advanced
Platform: Tradestation
Broker/Data: various
Favorite Futures: futures
 
Posts: 2,388 since Jul 2012
Thanks: 1,139 given, 4,387 received
Forum Reputation: Legendary



jeremysy View Post
For some reason that doesn't work. I was trying that and it gives me a "Casual Study: (Function)" errror

Try changing BullishEngulfing and BearishEngulfing to BullEng and BearEng and then define them

var: BullEng(False), BearEng(False);

If you have any questions please send me a Private Message or use the futures.io "Ask Me Anything" thread
Reply With Quote

Reply



futures io > > > > MultiChart MA In Easy Language not tying back

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Thinkscript to Easy Language jflippin TradeStation 4 January 26th, 2015 07:27 PM
Multichart / Esignal - language - Both same? Sam7768 eSignal 4 May 8th, 2014 09:08 PM
easy language ..not easy... Serger EasyLanguage Programming 4 April 26th, 2011 04:42 PM


All times are GMT -4. The time now is 08:58 PM.

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-16 in 0.11 seconds with 20 queries on phoenix via your IP 54.160.245.121