Easylanguage code problem, cross average - EasyLanguage Programming | futures io social day trading
futures io futures trading


Easylanguage code problem, cross average
Updated: Views / Replies:164 / 6
Created: by ponex 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
 
Thread Tools Search this Thread
 

Easylanguage code problem, cross average

  #1 (permalink)
Trading Apprentice
brescia/italia
 
Futures Experience: None
Platform: multicharts
Favorite Futures: emini es
 
Posts: 6 since Aug 2017
Thanks: 1 given, 0 received

Easylanguage code problem, cross average

Dears traders,

When sma60> sma90 and sma60> sma150 and sma90> sma150 we will take as maximum reference the maximum of the thirty candles before the cross.
If then this maximum will be broken upwards we will have long signal, otherwise short.

I have verified that it does not respect the minimum or maximum constraint of the 30 candles before the cross.
What's wrong with the formula ??

thank you.

luca


code:

Input: average(c), len(60), len1(90),len2(150);

condition1= len>len1 and len>len2 and len1>len2 ;
condition2=len<len1 and len<len2 and len1<len2;

condition3=H crosses over Highest(h,30);
condition4=L crosses under Lowest(l,30);

if condition1 and condition3 then buy next bar at market;
if condition1 and condition4 then sellshort next bar at market;

Attached Thumbnails
Easylanguage code problem, cross average-28.jpg  
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #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,455 since Apr 2013
Thanks: 222 given, 830 received


ponex,

the code snippet you posted can't trigger any entries as condition1 can never become true. Based on that it's hard to tell you what is wrong, but you could use the print reserved word to find out what values your code used exactly that caused the entry.

Regards,

ABCTG


ponex View Post
Dears traders,

When sma60> sma90 and sma60> sma150 and sma90> sma150 we will take as maximum reference the maximum of the thirty candles before the cross.
If then this maximum will be broken upwards we will have long signal, otherwise short.

I have verified that it does not respect the minimum or maximum constraint of the 30 candles before the cross.
What's wrong with the formula ??

thank you.

luca


code:

Input: average(c), len(60), len1(90),len2(150);

condition1= len>len1 and len>len2 and len1>len2 ;
condition2=len<len1 and len<len2 and len1<len2;

condition3=H crosses over Highest(h,30);
condition4=L crosses under Lowest(l,30);

if condition1 and condition3 then buy next bar at market;
if condition1 and condition4 then sellshort next bar at market;


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Trading Apprentice
brescia/italia
 
Futures Experience: None
Platform: multicharts
Favorite Futures: emini es
 
Posts: 6 since Aug 2017
Thanks: 1 given, 0 received


ABCTG View Post
ponex,

the code snippet you posted can't trigger any entries as condition1 can never become true. Based on that it's hard to tell you what is wrong, but you could use the print reserved word to find out what values your code used exactly that caused the entry.

Regards,

ABCTG

hi ABCTG,
Thank you for the reply.

My problem is to code.
example buy:
When the averages cross up, the cross is the condition that if it is true we will have buy signal at the top when it is exceeds the previous 30 candles crossing.

regards

Reply With Quote
 
  #5 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,455 since Apr 2013
Thanks: 222 given, 830 received

ponex,

the first thing to add to your code would be the computation of the averages. After that you can check when your conditions are true i.e. on which bar and what values they use for the crossings using the print reserved word.
This will help you understand what it's going on within your code.

Regards,

ABCTG

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
brescia/italia
 
Futures Experience: None
Platform: multicharts
Favorite Futures: emini es
 
Posts: 6 since Aug 2017
Thanks: 1 given, 0 received


ABCTG View Post
ponex,

the first thing to add to your code would be the computation of the averages. After that you can check when your conditions are true i.e. on which bar and what values they use for the crossings using the print reserved word.
This will help you understand what it's going on within your code.

Regards,

ABCTG

hi abctg


the code has improved,but it still does not respect the condiction:
if condition1 then entryl= highest(h,max)[1];
if condition2 then entrys=Lowest(l,min)[1];

code:

Input: price (close), len(60),len1(90),len2(150),max(30),min(30);

variables: var0(0), var1(0),var2(0),entryl(0),entrys(0);

var0=average (price,len);
var1=average (price,len1);
var2=average (price,len2);

condition1= var0>var1 and var0>var2 and var1>var2 ;
condition2=var0<var1 and var0<var2 and var1<var2;

if condition1 then entryl= highest(h,max)[1];
if condition2 then entrys=Lowest(l,min)[1];

if condition1 and h>entrys then buy next bar at market;
if condition2 and l< entrys then sellshort next bar at market;


regards

Reply With Quote
 
  #7 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,455 since Apr 2013
Thanks: 222 given, 830 received

ponex,

what are your results using the print reserved word? This a good way to help you finding out what is going on within your code.

Regards,

ABCTG

Reply With Quote

Reply



futures io > > > > > Easylanguage code problem, cross average

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

FuturesTrader71: TBA

Elite only

Al Brooks: TBA

Elite only

Jigsaw Trading: TBA

Oct 19

RandBots: TBA

Oct 24
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ninja trader code for ema cross stategy. gfdaniels The Elite Circle 4 July 18th, 2016 06:12 AM
moving average cross indicator monsieur NinjaTrader 0 November 29th, 2015 11:50 AM
Possible to change horizontal lines based on time in EasyLanguage? (Cross posted) jdwf16 TradeStation 1 July 25th, 2015 03:22 AM
how to code a trendline from a moving average cross? program MultiCharts 19 July 30th, 2012 10:05 PM
Easylanguage problem mengelbrecht MultiCharts 10 January 27th, 2012 07:14 AM


All times are GMT -4. The time now is 06:23 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-09-22 in 0.07 seconds with 19 queries on phoenix via your IP 54.80.77.124