Semicolon error in the formula after "CurrentBar" - futures io
futures io futures trading



Semicolon error in the formula after "CurrentBar"


Discussion in EasyLanguage Programming

Updated by FollowTheMoney
    1. trending_up 426 views
    2. thumb_up 1 thanks given
    3. group 1 followers
    1. forum 3 replies
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 100,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
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

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Semicolon error in the formula after "CurrentBar"

(login for full post details)
  #1 (permalink)
Sydney, Australia
 
Experience: Intermediate
Platform: TradeStation
Trading: ES NQ CL GC
 
Posts: 2 since Oct 2017
Thanks: 2 given, 0 received

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

Can you help answer these questions
from other members on futures io?
Do large speculators buy from commercials?
Traders Hideout
Where is the link to download GomiRecorder?
NinjaTrader
Horizontal Line Indicator
Platforms and Indicators
Atm strategy help
NinjaTrader
help to convert from thinkscript to ninjascript
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on futures io
Legal question and need desperate help
187 thanks
Building a high-performance data system
18 thanks
FIO Journal Challenge - June 2020 w/SharkIndicators
15 thanks
Is Orderflow An Outdated Concept?
11 thanks
VWAP for stock index futures trading?
11 thanks
 
(login for full post details)
  #3 (permalink)
Market Wizard
Cleveland Ohio/United States
 
Experience: Advanced
Platform: Tradestation
Broker: Tradestation, DeCarley, others
Trading: futures
 
Posts: 2,791 since Jul 2012
Thanks: 1,439 given, 5,380 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:
 
(login for full post details)
  #4 (permalink)
Sydney, Australia
 
Experience: Intermediate
Platform: TradeStation
Trading: 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


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Semicolon error in the formula after "CurrentBar"


March 19, 2018


Upcoming Webinars and Events
 

Getting Comfortable with Price Action Patterns w/Earn2Trade

Aug 4
 

Live Video Panel: Ask Me Anything w/Ironbeam Brokerage

Aug 6
     



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