NexusFi: Find Your Edge


Home Menu

 





Very simple easy language Help


Discussion in EasyLanguage Programming

Updated
      Top Posters
    1. looks_one ttsang with 2 posts (0 thanks)
    2. looks_two Quick Summary with 1 posts (0 thanks)
    3. looks_3 Big Mike with 1 posts (1 thanks)
    4. looks_4 ejtrader with 1 posts (0 thanks)
    1. trending_up 3,995 views
    2. thumb_up 1 thanks given
    3. group 2 followers
    1. forum 4 posts
    2. attach_file 0 attachments




 
Search this Thread

Very simple easy language Help

  #1 (permalink)
ttsang
newyork
 
Posts: 2 since Jun 2011
Thanks Given: 0
Thanks Received: 0

i have a set of conditions that will return true or false. Lets say i have condition1 to 5. i want condition1 and 2 happen 2 bars earlier and condition3 1 bar earlier then execute a buy.

but i just cant make it happen, it said Types are not compatible. this is what i did.

if condition 1 or condition2 = true and condition3 or condition4 = true then buy next bar at market;

but how can i make it two bars earlier for condition1 or 2 and one bar earlier for condition 3 or 4?


so what should i do to make it work?

any help would be greatly appreciate.

thanks

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Quant vue
Trading Reviews and Vendors
NexusFi Journal Challenge - May 2024
Feedback and Announcements
 
  #3 (permalink)
 
Big Mike's Avatar
 Big Mike 
Manta, Ecuador
Site Administrator
Developer
Swing Trader
 
Experience: Advanced
Platform: Custom solution
Broker: IBKR
Trading: Stocks & Futures
Frequency: Every few days
Duration: Weeks
Posts: 50,460 since Jun 2009
Thanks Given: 33,234
Thanks Received: 101,655


When evaluating condition1, use the bars index to go back 2 bars.

condition1 = Average(C, 20)[2] > C[2];

This would look at the SMA and the Close from 2 bars ago.

Mike

We're here to help: just ask the community or contact our Help Desk

Quick Links: Change your Username or Register as a Vendor
Searching for trading reviews? Review this list
Lifetime Elite Membership: Sign-up for only $149 USD
Exclusive money saving offers from our Site Sponsors: Browse Offers
Report problems with the site: Using the NexusFi changelog thread
Follow me on Twitter Visit my NexusFi Trade Journal Reply With Quote
Thanked by:
  #4 (permalink)
ttsang
newyork
 
Posts: 2 since Jun 2011
Thanks Given: 0
Thanks Received: 0

Thank you mike my fomular is like:

condition1 = false;
if close>close[1] and close[2]>close[1] then condition1= true;

so what i have to do is

if(close>close[1] and close[2]>close[1])[1] then condition1= true;

this one get one bar ahead

i actually think about it for a long time until i saw your comment then get me how to do it

Thanks

Reply With Quote
  #5 (permalink)
 ejtrader 
Portland, OR
 
Experience: Intermediate
Platform: Sierra Chart
Trading: ES
Posts: 269 since Jan 2011
Thanks Given: 327
Thanks Received: 180

you can also use some combination like MRO/LRO ( most/least recent occurrences) to check - how recent was the last event occurred.

Would see if I can find the syntax for it.

Thanks.

Reply With Quote




Last Updated on March 8, 2012


© 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