Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

  • Welcome Guests

    Welcome. You are currently viewing the forum as a guest which does not give you access to all the great features at Traders Laboratory such as interacting with members, access to all forums, downloading attachments, and eligibility to win free giveaways. Registration is fast, simple and absolutely free. Create a FREE Traders Laboratory account here.

emptyvault

Request for Help from a Novice MC Easy Language User

Recommended Posts

hi ,

I just started to familiar with easy language and tried to practice it .

 

Here is the code for visually present two kinds of average , one greater than another one , up and down . Something like that . One is adaptive average and the other shorter one is custom make . Here is the code .

 

inputs:

Price( Close ),

EffRatioLength( 10 ),

FastAvgLength( 2 ),

SlowAvgLength( 30 ) ;

 

variables:

var0( 0 ) ;

 

var0 = AdaptiveMovAvg( Price, EffRatioLength, FastAvgLength, SlowAvgLength ) ;

 

variables: S1(0),S2(0),S3(0),S4(0),S5(0),S6(0),PI(0),SD(0),Num(0),Den(0),sin6(0);

 

PI=3.1415926;

SD=180/7;

S1=sine(1*180/7)*C;

S2=sine(2*180/7)*C[1];

S3=sine(3*180/7)*C[2];

S4=sine(4*180/7)*C[3];

S5=sine(5*180/7)*C[4];

S6=sine(6*180/7)*C[5];

Num=S1+S2+S3+S4+S5+S6;

sin6 = sine(SD)+sine(2*SD)+sine(3*SD)+sine(4*SD)+sine(5*SD)+sine(6*SD);

 

If sin6 > var0 then

PlotPaintBar(High,Low,open,close,"",green);

 

The MC complier test it ok and when I tested to highlight a bar individually they worked ok too . It cannot paint anything when I combined them together .

 

What is the mistake ?

thanks

Share this post


Link to post
Share on other sites

oh , sorry , I have fixed it already .

 

I would like to know . Is it necessary for MC to put every indicator's coding from each scripts of the paintbar or indicators if the indicators are already exist in my list ? Is there any "refer" function or syntax which can make is easier ?

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.