Noob alert! Query regarding entering variable - MultiCharts | futures io social day trading
futures io futures trading


Noob alert! Query regarding entering variable
Updated: Views / Replies:1,410 / 14
Created: by saj1011 Attachments:2

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 90,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
 2  
 
Thread Tools Search this Thread
 

Noob alert! Query regarding entering variable

  #1 (permalink)
Elite Member
London, United Kingdom
 
Futures Experience: Intermediate
Platform: MetaTrader
Favorite Futures: EUR/USD
 
Posts: 20 since Feb 2014
Thanks: 2 given, 1 received

Noob alert! Query regarding entering variable

Hi,

in Big Mike's video:

https://futures.io/multicharts/11278-video-tutorial-how-create-advanced-multicharts-easylanguage-strategy.html

about teaching EL (which i just went through), he says that the variable "Ticksize" is not standard with MC.
I tried compiling the script and got an error highlighting that line of code of course. So, how do I get the ticksize variable in MC?

Thanks

Attached Thumbnails
Noob alert! Query regarding entering variable-mc-non-compile-error.jpg  
Reply With Quote
 
  #2 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

saj1011,

what is the exact error message you are getting? Although ticksize is a function now, it compiles fine here as a variable. The image from your code looks you declared the variable ticksize fine, that's why the error message would be helpful in tracking the issue down. Also include the exact version of your MC.

You can also try a code with only this
 
Code
vars: ticksize (minmove/pricescale);
Does it compile? If not, does it compile if you change it to
 
Code
vars: vticksize (minmove/pricescale);
Regards,
ABCTG

Reply With Quote
 
  #3 (permalink)
Elite Member
London, United Kingdom
 
Futures Experience: Intermediate
Platform: MetaTrader
Favorite Futures: EUR/USD
 
Posts: 20 since Feb 2014
Thanks: 2 given, 1 received

REPLY


error is this from original "Ticksize" code:

------ Build started: ------
Study: "futures.io (formerly BMT)_MoneyMaker" (Signal)
Please wait ....
------ Compiled with error(s): ------
'(' Expected
line 12, column 4

with "vticksize" same error:

------ Build started: ------
Study: "futures.io (formerly BMT)_MoneyMaker" (Signal)
Please wait ....
------ Compiled with error(s): ------
'(' Expected
line 12, column 4

Also, I noticed you removed the spaces ( MinMove / PriceScale ), to (MinMove / PriceScale), is this significant or just a matter or neatness?

as it happens line 12 is the row with "vars" on it

what is difference between vticksize and ticksize?

why also is the word Ticksize purple when typed? is this because my version of MC is old/needs updated as you say it is now included?
Also, when i type in vticksize it is greyed out like the other variables.
when it is purple does that mean it is ok or not?

Apologies for noob questions!

version 3.0 powerlanguage, product 8.8.8593.400


Thanks

Reply With Quote
 
  #4 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

saj1011,

please post the full code in here, the error you are getting is not related to ticksize.




saj1011 View Post
error is this from original "Ticksize" code:

Also, I noticed you removed the spaces ( MinMove / PriceScale ), to (MinMove / PriceScale), is this significant or just a matter or neatness?

Just neatness.


what is difference between vticksize and ticksize?

No difference in general, but MC has a function that is called ticksize, that's why the word ticksize is purple. This shouldn't make any issues though.

Regards,
ABCTG

Reply With Quote
 
  #5 (permalink)
Elite Member
London, United Kingdom
 
Futures Experience: Intermediate
Platform: MetaTrader
Favorite Futures: EUR/USD
 
Posts: 20 since Feb 2014
Thanks: 2 given, 1 received

reply

this is the whole compile error

------ Build started: ------
Study: "futures.io (formerly BMT)_MoneyMaker" (Signal)
Please wait ....
------ Compiled with error(s): ------
'(' Expected
line 12, column 4





fyi: mc version MultiCharts64 Version 8.8 Release (Build 8593)

Reply With Quote
 
  #6 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

saj1011,

I need to see the exact PowerLanguage code to be able to help, meaning the code that produces the error on your end. Can you post this?

Regards,
ABCTG

Reply With Quote
 
  #7 (permalink)
Elite Member
London, United Kingdom
 
Futures Experience: Intermediate
Platform: MetaTrader
Favorite Futures: EUR/USD
 
Posts: 20 since Feb 2014
Thanks: 2 given, 1 received

reply

(same code as BM posted in his thread about learning EL code with vdieo)

inputs:
smalength (200),
emalength (100),
hmalength (34),
target1 (12),
target2 (12),
target3 (20),
stopsize (12),
BE2 (0), // 0=false, 1=true
BE3 (0), // 0=false, 1=true

vars:
ticksize ( MinMove / PriceScale ),
smav (0),
emav (0),
hmav (0),
t1 ( Target1 * TickSize ),
t2 ( (Target1 + Target2) * TickSize ),
t3 ( (Target1 + Target2 + Target3) * TickSize ),
st1 ( 0 ),
st2 ( 0 ),
st3 ( 0 );

smav = Average(Close, smalength);
emav = XAverage(Close, emalength);
hmav = jtHMA(Close, hmalength);


// open new positions

if MarketPosition = 0 then begin

if smav > smav[1] and emav > emav[1] and hmav > hmav[1] then begin

Buy ("Enter long") 3 Contracts Next Bar At Market;
end;

if smav < smav[1] and emav < emav[1] and hmav < hmav[1] then begin

SellShort ("Enter short") 3 Contracts Next Bar At Market;
end;

end;

// manage open orders

if MarketPosition = 1 then begin

st1 = EntryPrice - (stopsize * TickSize);
st2 = iff(BE2 = 1, EntryPrice, EntryPrice - (stopsize * TickSize));
st3 = iff(BE3 = 1, EntryPrice, EntryPrice - (stopsize * TickSize));

if CurrentContracts = 1 then begin
Sell ("Exit l3-c1 Target") 1 Contracts Next Bar At (EntryPrice + t3) Limit;
Sell ("Exit l3-c1 Stop") 1 Contracts Next Bar At st3 Stop;
end;

if CurrentContracts = 2 then begin
Sell ("Exit l2-c2 Target") 1 Contracts Next Bar At (EntryPrice + t2) Limit;
Sell ("Exit l2-c2 Stop") 1 Contracts Next Bar At st2 Stop;
Sell ("Exit l3-c2 Target") 1 Contracts Next Bar At (EntryPrice + t3) Limit;
Sell ("Exit l3-c2 Stop") 1 Contracts Next Bar At st3 Stop;
end;

if CurrentContracts = 3 then begin
Sell ("Exit l1-c3 Target") 1 Contracts Next Bar At (EntryPrice + t1) Limit;
Sell ("Exit l1-c3 Stop") 1 Contracts Next Bar At st1 Stop;
Sell ("Exit l2-c3 Target") 1 Contracts Next Bar At (EntryPrice + t2) Limit;
Sell ("Exit l2-c3 Stop") 1 Contracts Next Bar At st2 Stop;
Sell ("Exit l3-c3 Target") 1 Contracts Next Bar At (EntryPrice + t3) Limit;
Sell ("Exit l3-c3 Stop") 1 Contracts Next Bar At st3 Stop;
end;

end;

if MarketPosition = -1 then begin

st1 = EntryPrice + (stopsize * TickSize);
st2 = iff(BE2 = 1, EntryPrice, EntryPrice + (stopsize * TickSize));
st3 = iff(BE3 = 1, EntryPrice, EntryPrice + (stopsize * TickSize));

if CurrentContracts = 1 then begin
BuyToCover ("Exit s3-c1 Target") 1 Contracts Next Bar At (EntryPrice - t3) Limit;
BuyToCover ("Exit s3-c1 Stop") 1 Contracts Next Bar At st3 Stop;
end;

if CurrentContracts = 2 then begin
BuyToCover ("Exit s2-c2 Target") 1 Contracts Next Bar At (EntryPrice - t2) Limit;
BuyToCover ("Exit s2-c2 Stop") 1 Contracts Next Bar At st2 Stop;
BuyToCover ("Exit s3-c2 Target") 1 Contracts Next Bar At (EntryPrice - t3) Limit;
BuyToCover ("Exit s3-c2 Stop") 1 Contracts Next Bar At st3 Stop;
end;

if CurrentContracts = 3 then begin
BuyToCover ("Exit s1-c3 Target") 1 Contracts Next Bar At (EntryPrice - t1) Limit;
BuyToCover ("Exit s1-c3 Stop") 1 Contracts Next Bar At st1 Stop;
BuyToCover ("Exit s2-c3 Target") 1 Contracts Next Bar At (EntryPrice - t2) Limit;
BuyToCover ("Exit s2-c3 Stop") 1 Contracts Next Bar At st2 Stop;
BuyToCover ("Exit s3-c3 Target") 1 Contracts Next Bar At (EntryPrice - t3) Limit;
BuyToCover ("Exit s3-c3 Stop") 1 Contracts Next Bar At st3 Stop;
end;
end;

Reply With Quote
 
  #8 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary

saj1011,

you are missing a ; in your code. Change your code from this
 
Code
BE3 (0), // 0=false, 1=true

vars:
ticksize ( MinMove / PriceScale ),
to this
 
Code
BE3 (0); // 0=false, 1=true

vars:
ticksize ( MinMove / PriceScale ),
The comma at the end of line 10 needs to be a semicolon. This will compile your code fine.

Regards,
ABCTG

Reply With Quote
 
  #9 (permalink)
Elite Member
London, United Kingdom
 
Futures Experience: Intermediate
Platform: MetaTrader
Favorite Futures: EUR/USD
 
Posts: 20 since Feb 2014
Thanks: 2 given, 1 received

reply

Ok, thanks a million!

I thought it was because it had purpled out the word ticksize vs the other variables that were grey.
why did it make it purple?

Reply With Quote
 
  #10 (permalink)
Market Wizard
Hamburg Germany
 
Futures Experience: Advanced
Platform: Multicharts, Tradestation, Multicharts.NET, NinjaTrader, MetaTrader
Broker/Data: DTN IQ
Favorite Futures: ES
 
Posts: 1,533 since Apr 2013
Thanks: 231 given, 855 received
Forum Reputation: Legendary


You are welcome. I answered it here: https://futures.io/multicharts/31155-noob-alert-query-regarding-entering-variable.html#post398879
purple = function

Regards,
ABCTG

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

Reply



futures io > > > > Noob alert! Query regarding entering variable

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
SuperTrendU11 Strategy Query sburtt NinjaTrader Programming 14 May 29th, 2013 06:34 PM
Three Line Break on FX Query Zhorny MultiCharts 1 November 21st, 2012 06:12 AM
Direct query for account balance? drmartell Reviews of Brokers and Data Feeds 4 November 15th, 2012 02:01 PM
Using Excel to query MySQL database Big Mike The Elite Circle 3 November 7th, 2012 08:40 AM
Database - A Simple Query ab456 Traders Hideout 1 October 15th, 2011 03:04 PM


All times are GMT -4. The time now is 05:11 PM.

Copyright © 2017 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
Page generated 2017-12-17 in 0.15 seconds with 20 queries on phoenix via your IP 54.163.210.170