NexusFi: Find Your Edge


Home Menu

 





TS / MC : Basic Indicator Help?


Discussion in EasyLanguage Programming

Updated
    1. trending_up 3,300 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




 
Search this Thread

TS / MC : Basic Indicator Help?

(login for full post details)
  #1 (permalink)
Micardo
UK
 
Posts: 1 since Feb 2011
Thanks Given: 0
Thanks Received: 0

Hi,

I am attempting to learn easylanguage and have been working through the document trying the exercises etc.

I am struggling with my own attempt at a strategy and was wondering if someone could give me a pointer as to what I am doing wrong.

Below is the code, I am only trying to get the vuys working at this moment hence not much there, but when I add the signal to my charts I don't see any buy orders opened.



value1 = Highest(High, 20);
condition1 = value1 < Close;

if condition1 then buy next bar at market;



Please let me know what I am doing wrong.

Also would someone mind letting me know what the main differences are between PowerLanguage and EasyLanguage? I have gone through the EasyLanguage getting started which is what got me to here but I have noticed certain subtle differences (the case is different for instance).

Thank you for your help!

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
News alerts
Traders Hideout
Searching for CurrentMonthOHL Indicator
NinjaTrader
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Wicked Renko Bars
Traders Hideout
Request for MACD with option to use different MAs for fa …
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Tao te Trade: way of the WLD
37 thanks
GFIs1 1 DAX trade per day journal
27 thanks
Deaddogs Stock Trading
27 thanks
Supertradersams Thread Journal on NQ/MNQ
24 thanks
Leaving CFD trading and learning futures
11 thanks

(login for full post details)
  #3 (permalink)
TradingGuy
Connecticut
 
Posts: 15 since Jan 2011
Thanks Given: 1
Thanks Received: 8



Micardo View Post
Hi,

I am attempting to learn easy language and have been working through the document trying the exercises etc.

I am struggling with my own attempt at a strategy and was wondering if someone could give me a pointer as to what I am doing wrong.

Below is the code, I am only trying to get the buys working at this moment hence not much there, but when I add the signal to my charts I don't see any buy orders opened.



value = Highest(High, 20);
condition = value < Close;

if condition then buy next bar at market;



Please let me know what I am doing wrong.

Also would someone mind letting me know what the main differences are between Power Language and Easy Language? I have gone through the Easy Language getting started which is what got me to here but I have noticed certain subtle differences (the case is different for instance).

Thank you for your help!

You are asking if the highest high of the last 20 bars is less then the close of the last bar, it will never happen. If you are looking to see if the close of the current bar is higher than the high of the 20 bars before it (breakout) you would start your 20 bar look back one bar back, something like this.

 
Code
value=Highest(High,20);
condition=value[1] < Close;
if condition1 then buy next bar at market;
That will get you an entry with no exits. To exit after 10 bars you can use this.

 
Code
value1=Highest(High,20);
condition1=value1[1] < Close;
if condition1 then buy next bar at market;
if barssinceentry = 10 then
 sell next bar at market;
The code tags seem to damage the code formatting, sorry about that, this should get you started.

Regarding the differences between PowerLanguage and EasyLanguage, EasyLanguage is a TradeStation language and PowerLanguage is a language by MultiCharts that is "mostly" compatible with EasyLanguage.

Regards,
Guy

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





Last Updated on February 27, 2011


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts