Semicolon error in the formula after "CurrentBar" - EasyLanguage Programming | futures io social day trading
futures io futures trading


Semicolon error in the formula after "CurrentBar"
Updated: Views / Replies:303 / 3
Created: by FollowTheMoney Attachments:0

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 100,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
 

Semicolon error in the formula after "CurrentBar"

  #1 (permalink)
Sydney, Australia
 
Trading Experience: Intermediate
Platform: TradeStation
Favorite Futures: ES NQ CL GC
 
Posts: 2 since Oct 2017
Thanks: 2 given, 0 received

Semicolon error in the formula after "CurrentBar"

Hi guys, New to EL here so likely I am overlooking something simple.

I am trying to code a strategy that requires an indicator to cross a threshold line, then wait, and then take the exit as it crosses the threshold again. However, something is wrong with compiling - in Condition_4 formula, it assumes CurrentBar needs to end the argument - asks for ')' there, in another version it similarly it asks for semicolon.

Please let me know what am I missing. I used a similar example from TS help files, with the same problem.

Thank you.


 
Code
Condition_2 = ( IndicatorValue > ThresholdHigh );

if Condition_2 then
	begin
	 Condition_3 = true ; // record that condition 2 happened, keeps ther record even after conditon 2 becomes false
	 value_1 = CurrentBar ; // record at which bar condition 2 happened
	end ; 

Condition_4	= ( CurrentBar – value_1 ) > 2 ; // wait 2 bars or more after condition 2 (used to start looking for exit condition)

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
Cleveland Ohio/United States
 
Trading Experience: Advanced
Platform: Tradestation
Broker/Data: Tradestation, DeCarley, others
Favorite Futures: futures
 
Posts: 2,632 since Jul 2012
Thanks: 1,356 given, 5,026 received



FollowTheMoney View Post
Hi guys, New to EL here so likely I am overlooking something simple.

I am trying to code a strategy that requires an indicator to cross a threshold line, then wait, and then take the exit as it crosses the threshold again. However, something is wrong with compiling - in Condition_4 formula, it assumes CurrentBar needs to end the argument - asks for ')' there, in another version it similarly it asks for semicolon.

Please let me know what am I missing. I used a similar example from TS help files, with the same problem.

Thank you.


 
Code
Condition_2 = ( IndicatorValue > ThresholdHigh );

if Condition_2 then
	begin
	 Condition_3 = true ; // record that condition 2 happened, keeps ther record even after conditon 2 becomes false
	 value_1 = CurrentBar ; // record at which bar condition 2 happened
	end ; 

Condition_4	= ( CurrentBar – value_1 ) > 2 ; // wait 2 bars or more after condition 2 (used to start looking for exit condition)



Try retyping the Condition_4 line from scratch. I think you might have an invalid character (like a tab character) in the code before the equal sign.

I retyped that line, and it verifies fine.

Follow me on Twitter Reply With Quote
The following user says Thank You to kevinkdog for this post:
 
  #4 (permalink)
Sydney, Australia
 
Trading Experience: Intermediate
Platform: TradeStation
Favorite Futures: ES NQ CL GC
 
Posts: 2 since Oct 2017
Thanks: 2 given, 0 received


kevinkdog View Post
Try retyping the Condition_4 line from scratch. I think you might have an invalid character (like a tab character) in the code before the equal sign.

I retyped that line, and it verifies fine.

Kevin, thanks for solving my not so fun mystery! Great tip!

Reply With Quote

Reply



futures io > > > > > Semicolon error in the formula after "CurrentBar"




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

futures io is celebrating 10-years w/ over $18,000 in prizes!

Right now
 

$250 Amazon Gift Cards with our "Thanks Contest" challenge!

Right now
 

Show us your trading desks and win over $5,000 in prizes w/Jigsaw Trading

September
 

The Spirituality of Trading w/Dr Brett Steenbarger

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Confused about "Currentbar", using Ichimoku Cloud WPITrader EasyLanguage Programming 9 April 1st, 2015 02:55 PM
NinjaScript Interface implement error "IsValidPlot" qzhang119 Elite Automated NinjaTrader Trading 4 September 25th, 2012 12:13 AM
Fukushima: "China Syndrome Is Inevitable" ... "Huge Steam Explosions", or "Nuclear Bo Quick Summary News and Current Events 0 November 22nd, 2011 01:50 AM
How to change "Stop Loss" and "Take Profit" in "shElderImpulse" Strategy javed759 NinjaTrader 1 November 1st, 2011 10:44 PM
NT crashes "Error on loading chart" john924 NinjaTrader 7 September 7th, 2010 12:49 AM


All times are GMT -4. The time now is 06:17 AM. (this page content is cached, log in for real-time version)

Copyright © 2019 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