how to code a trendline from a moving average cross? - MultiCharts | futures io social day trading
futures io futures trading


how to code a trendline from a moving average cross?
Updated: Views / Replies:4,241 / 19
Created: by program Attachments:4

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

how to code a trendline from a moving average cross?

  #1 (permalink)
Scarecrow
CA USA
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: DDT+land/Rithmic/IQ
Favorite Futures: S&P500,6E,YM
 
program's Avatar
 
Posts: 100 since Nov 2010
Thanks: 127 given, 63 received

how to code a trendline from a moving average cross?

fairly straight forward but giving me trouble, please bear with me, still learning.
how would you code a trend line or tl_new statement to draw a line from a moving average crossing?? then maybe end on subsequent prices of moving averages, or high pivot or current high...
basically i'm having trouble capturing a MA cross for a trend line statement
here is a snippet of code that i've learned for pivots... how would i modify it for ma cross trend lines??
 
Code
condition1 = Pivot(L,25,leftstrength,rightstrength,1,-1,oPivotPrice1,oPivotBar1) <>-1;

condition2 = Pivot(L,25,leftstrength,rightstrength,2,-1,oPivotPrice2,oPivotBar2) <>-1;

TL_new(D[oPivotBar2], T[oPivotBar2], L[oPivotBar2],
      D[oPivotBar1], T[oPivotBar1], L[oPivotBar1]);
Thanks,

I have approximate answers, possible beliefs and different degrees of certainty of different things. But I'm not absolutely sure of anything and there are many things i don't know anything about.
Reply With Quote
 
  #2 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

Hi,

( It is not because I am asking a question that I will have time to code it. So, if somebody else wants to propose a code, do not hesitate! :-) )

Could you clarify what the second point of the trendline is?
I mean:
When there is a MA crossover, you want a trendline to be drawn between this crossover and which point?

Nicolas

Envoyé depuis mon GT-I9100 avec Tapatalk

Reply With Quote
 
  #3 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received


And is it linked to this method presented by @creekboy ?
If yes, it is not a problem, but I prefer that he be informed, by politeness.

Reply With Quote
 
  #4 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

Enclosed please find a code.

Each time there is an EMA crossover, it draws a trendline between:
- the said EMA crossover, and
- the middle of the two EMA at the time of the next swing point.
The arrows identify all swing points (strength = 3), for checking purpose. They could be deleted.

I have done it in 10 minutes, so there may be mistake inside. At least, it is a basis to build from.

Nicolas

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

Attached Files
Register to download File Type: txt TrendLineAtMACrossover.txt (2.2 KB, 42 views)

Last edited by Nicolas11; July 30th, 2012 at 09:33 AM. Reason: clarification
Reply With Quote
The following 3 users say Thank You to Nicolas11 for this post:
 
  #5 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

Here is an improved version: v2.

With the help of some mathematical calculations, the trendlines now pass exactly through the crossovers. Refer to the red circles on the pic.

Nicolas

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

Attached Files
Register to download File Type: txt TrendLineAtMACrossover - v2.txt (3.3 KB, 61 views)
Reply With Quote
The following 5 users say Thank You to Nicolas11 for this post:
 
  #6 (permalink)
Elite Member
phl pa. usa
 
Futures Experience: Advanced
Platform: tos
Favorite Futures: es
 
Posts: 1,126 since Mar 2012
Thanks: 106 given, 347 received

nicolas -thats close in some areas and way off in others -the ma cross is the chart i use for pivot trading -if you refer to the original post you will see the setup i use for day trading -close only counts in handgrenades :sos:





Nicolas11 View Post
Here is an improved version: v2.

With the help of some mathematical calculations, the trendlines now pass exactly through the crossovers. Refer to the red circles on the pic.

Nicolas

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


:when you cheat -you only cheat yourself
refer to post # 470 & 527 & 930
option traders refer to post 996 thru 1005
Reply With Quote
 
  #7 (permalink)
Elite Member
near Paris, France
 
Futures Experience: Beginner
Platform: -
Favorite Futures: -
 
Nicolas11's Avatar
 
Posts: 1,070 since Aug 2011
Thanks: 2,232 given, 1,729 received

Hi @creekboy,

I am not very comfortable with the situation and I would like to clarify something. I am not trying to duplicate/code your method, and I will not. Actually, I do not even know what your method is.

The story is...
When I started to work on the original question of @program, it rang a bell. "I have already seen this kind of line originating from MA crossover somewhere...". And I remembered your thread.
I was a bit embarrassed.
Perhaps @program was working on your method. Perhaps not. In any case, I preferred to put you in the loop rather than do things "in your back".

But I do not ask you to comment my work in order to move the code closer to your method. Actually I do not ask you anything. And I do not want to move the code closer to your method. I just wanted you to be informed in case this was in relation with your method. But perhaps it is not.

My purpose was just to answer to @program's original question and I think that I did it. I am ready to make minor modifications if he has additional clear specifications. But I will not go further anyway.

Nicolas

Reply With Quote
The following user says Thank You to Nicolas11 for this post:
 
  #8 (permalink)
Elite Member
phl pa. usa
 
Futures Experience: Advanced
Platform: tos
Favorite Futures: es
 
Posts: 1,126 since Mar 2012
Thanks: 106 given, 347 received

Nicholas- its very nice to meet a person of integrity -and i thankyou for that -no has asked or has been granted and rights to this system - i find it interesting that with all the knowledge on this forum that something new came still show up and work so well ,that any new trader can find success without being bled for his hard earned money to point them in the way of profit so easily -

some think -how can someone put something so important out there -but at 53 years of age maybe its put out there because something easier and better has been found -

but i repeat -no-one has been granted any rights to this system -

i may be a creekboy but i am no kid








Nicolas11 View Post
Hi @creekboy,

I am not very comfortable with the situation and I would like to clarify something. I am not trying to duplicate/code your method, and I will not. Actually, I do not even know what your method is.

The story is...
When I started to work on the original question of @program, it rang a bell. "I have already seen this kind of line originating from MA crossover somewhere...". And I remembered your thread.
I was a bit embarrassed.
Perhaps @program was working on your method. Perhaps not. In any case, I preferred to put you in the loop rather than do things "in your back".

But I do not ask you to comment my work in order to move the code closer to your method. Actually I do not ask you anything. And I do not want to move the code closer to your method. I just wanted you to be informed in case this was in relation with your method. But perhaps it is not.

My purpose was just to answer to @program's original question and I think that I did it. I am ready to make minor modifications if he has additional clear specifications. But I will not go further anyway.

Nicolas


:when you cheat -you only cheat yourself
refer to post # 470 & 527 & 930
option traders refer to post 996 thru 1005
Reply With Quote
The following user says Thank You to creekboy for this post:
 
  #9 (permalink)
Scarecrow
CA USA
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: DDT+land/Rithmic/IQ
Favorite Futures: S&P500,6E,YM
 
program's Avatar
 
Posts: 100 since Nov 2010
Thanks: 127 given, 63 received


Nicolas11 View Post
Hi @creekboy,

I am not very comfortable with the situation and I would like to clarify something. I am not trying to duplicate/code your method, and I will not. Actually, I do not even know what your method is.

The story is...
When I started to work on the original question of @program, it rang a bell. "I have already seen this kind of line originating from MA crossover somewhere...". And I remembered your thread.
I was a bit embarrassed.
Perhaps @program was working on your method. Perhaps not. In any case, I preferred to put you in the loop rather than do things "in your back".

But I do not ask you to comment my work in order to move the code closer to your method. Actually I do not ask you anything. And I do not want to move the code closer to your method. I just wanted you to be informed in case this was in relation with your method. But perhaps it is not.

My purpose was just to answer to @program's original question and I think that I did it. I am ready to make minor modifications if he has additional clear specifications. But I will not go further anyway.

Nicolas

Hello all, thanks for the responses...
I absolutely got this from CreekBoy, i was impressed with the simplicity of his system and style. I thought it would be a great exercise for my meager easylanguage ability... It's not my intention to plagiarize his method, just learn, or better my coding from it. I've already mentioned this to CreekBoy, and my lack of progress, with his recommendation to enlist help from Cory.
...but then again i never said/mentioned I wanted to start a thread requesting help.
in retrospect this may be insensitive.
I don't want to ruffle any feathers or step on any toes...
@creekboy you have PM

I have approximate answers, possible beliefs and different degrees of certainty of different things. But I'm not absolutely sure of anything and there are many things i don't know anything about.
Reply With Quote
 
  #10 (permalink)
Scarecrow
CA USA
 
Futures Experience: Intermediate
Platform: MultiCharts
Broker/Data: DDT+land/Rithmic/IQ
Favorite Futures: S&P500,6E,YM
 
program's Avatar
 
Posts: 100 since Nov 2010
Thanks: 127 given, 63 received



creekboy View Post
Nicholas- its very nice to meet a person of integrity -and i thankyou for that -no has asked or has been granted and rights to this system - i find it interesting that with all the knowledge on this forum that something new came still show up and work so well ,that any new trader can find success without being bled for his hard earned money to point them in the way of profit so easily -

some think -how can someone put something so important out there -but at 53 years of age maybe its put out there because something easier and better has been found -

but i repeat -no-one has been granted any rights to this system -

i may be a creekboy but i am no kid

just to clarify, It's not my intention to have rights to, or copy, CreekBoy's system... just learn MC Powerlanguage and how trend lines can be drawn from MA crosses or other events for that matter... most trend lines are based off prices in time not events. I found that interesting in CreekBoys system. Apologies for any perceived insensitivity or lack of integrity.

we can lock it up if I've rubbed anyone the wrong way

I have approximate answers, possible beliefs and different degrees of certainty of different things. But I'm not absolutely sure of anything and there are many things i don't know anything about.
Reply With Quote

Reply



futures io > > > > how to code a trendline from a moving average cross?

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
Best Moving Average sharmas Elite Automated Trading 62 April 9th, 2012 07:44 PM
Moving Average Kush NinjaTrader Programming 5 November 6th, 2011 01:49 PM
Moving average Help yiman NinjaTrader Programming 4 July 29th, 2011 09:03 AM
New Moving Average arnaudlx The Elite Circle 10 January 28th, 2011 06:15 AM
How to code a Simple Moving Average? Fat Tails NinjaTrader Programming 5 October 20th, 2010 09:04 PM


All times are GMT -4. The time now is 02:16 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.15 seconds with 20 queries on phoenix via your IP 54.226.34.209