can i write a line of code that if the up volume > down volume then .... - MultiCharts | futures io social day trading
futures io futures trading


can i write a line of code that if the up volume > down volume then ....
Updated: Views / Replies:709 / 5
Created: by honoluluhustler 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 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
 
Thread Tools Search this Thread
 

can i write a line of code that if the up volume > down volume then ....

  #1 (permalink)
Trading Apprentice
Honolulu + Hawaii / USA
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: Gold
 
Posts: 18 since Jul 2014
Thanks: 16 given, 1 received

can i write a line of code that if the up volume > down volume then ....

I have a program i notice when it places a trade a loses the down volume is greater than the up volume

Is there a way i can write a line of code if Up Volume > Down Volume then ....

I tried

if volume > VOVO
and
"upticks bars > DownTicks bars"
and
ROC1 > RATEY
and
Price[1] crosses above ExpAv1[1]
then
begin
buy ( "buy") Cts contracts next bar at market ;
end;

and it returns this message to me when i try to compile

------ Compiled with error(s): ------
'If' condition must be followed by the word 'Then'
line 42, column 0


[IMG]
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
updown volume ratio by tracyrollins92, on Flickr[/IMG]


Last edited by honoluluhustler; August 4th, 2014 at 06:27 PM. Reason: invalid image
Reply With Quote
 
  #2 (permalink)
Elite Member
Texas, USA
 
Futures Experience: Intermediate
Platform: X_TRADER Pro, Custom
Broker/Data: NxCore
Favorite Futures: Futures, Spreads
 
Hulk's Avatar
 
Posts: 215 since May 2014
Thanks: 509 given, 474 received


honoluluhustler View Post
I have a program i notice when it places a trade a loses the down volume is greater than the up volume

Is there a way i can write a line of code if Up Volume > Down Volume then ....

I tried

if volume > VOVO
and
"upticks bars > DownTicks bars"
and
ROC1 > RATEY
and
Price[1] crosses above ExpAv1[1]
then
begin
buy ( "buy") Cts contracts next bar at market ;
end;

and it returns this message to me when i try to compile

------ Compiled with error(s): ------
'If' condition must be followed by the word 'Then'
line 42, column 0


[IMG]
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).
updown volume ratio by tracyrollins92, on Flickr[/IMG]

My 2 cents are that it is going to be very difficult for someone to help you with questions like these. I would recommend that you at least go through a tutorial that introduces you to the basics of EasyLanguage.

I would also recommend including your intended program logic in plain language so that someone understands what exactly you are trying your code to do for you.

The more specific the question, the better chances you have at getting it answered.

For this specific error message, I am copying the built in TradeStation help which you can easily access by pressing F1 in the Development environment:


EL Reserved Words and Functions - TradeStation Help
If (Reserved Word)
image\trumpet2.gif Disclaimer

This word is used to introduce a condition that will be evaluated to determine execution of additional code.

If

Remarks
If can only be used to begin an If... Then or If... Then... Else statement.

In order to use an If... Then... Else statement, a Begin... End statement must follow Then as in the second example below.

Examples
If Condition1 Then
{Your Code Line1}

If is used here to start the If... Then statement. The Line1 code will be executed if Condition1 returns a value of True. If Condition1 is false, the Line1 code will not be executed.

If Condition1 And Condition2 Then Begin
{Your Code Line1}
{Your Code Line2, etc.}
End
Else Begin
{Your Code Line3}
{Your Code Line4, etc.}
End;

If is used here to start the If... Then... Else statement. The Line1 and Line2 code will be executed if Condition1 and Condition2 return a value of True. If Condition1 or Condition2 is false, the Line3 and Line4 code will be executed.


Reply With Quote
The following 3 users say Thank You to Hulk for this post:
 
  #3 (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


honoluluhustler,

in my opinion you are looking for the reserved words UpTicks and DownTicks, they will only work with realtime data though. It appears the error comes from you using words that are not recognized by the compiler.
I would like to second what @Hulk wrote, take the time going over some tutorials or the EL Essentials PDF and I can almost guarantee you that it will boost your coding to a new level. In the end you will save a lot of time and hassle by devoting some time to laying a solid foundation.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #4 (permalink)
Trading Apprentice
Honolulu + Hawaii / USA
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: Gold
 
Posts: 18 since Jul 2014
Thanks: 16 given, 1 received

I fixed it.

Vars:
VolUP ( 0 ),
VolDOWN ( 0 );

VolUP = upticks;
VolDOWN = Downticks;

if Volume > VOVO
and
VolUP > VolDOWN
then
begin
buy ( "buy") Cts contracts next bar at market ;
MarketPosition = true;
end;

Reply With Quote
 
  #5 (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

From looking at your code it might be possible you are not getting the correct Volume information when using "Volume" as a reserved word. Take a look at the build in Volume indicator. You should check for the bartype and either use TIcks or Volume depending on the Bar type you are using, as there is a difference for daily bars or minute and lower.

Regards,
ABCTG


honoluluhustler View Post
I fixed it.

Vars:
VolUP ( 0 ),
VolDOWN ( 0 );

VolUP = upticks;
VolDOWN = Downticks;

if Volume > VOVO
and
VolUP > VolDOWN
then
begin
buy ( "buy") Cts contracts next bar at market ;
MarketPosition = true;
end;


Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #6 (permalink)
Trading Apprentice
Honolulu + Hawaii / USA
 
Futures Experience: Intermediate
Platform: TradeStation
Favorite Futures: Gold
 
Posts: 18 since Jul 2014
Thanks: 16 given, 1 received

it was in ticks. Thanks for mentioning that!

Reply With Quote

Reply



futures io > > > > can i write a line of code that if the up volume > down volume then ....

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
Gom Delta Volume Hard Code Write Data Taddypole The Elite Circle 1 July 30th, 2013 01:44 PM
Volume total on swing, can someone code? Thanks hector24 NinjaTrader 4 June 22nd, 2013 07:05 AM
code for NT7 volume oscillator euroventure NinjaTrader 2 December 22nd, 2010 12:42 PM
can you help with code, would like to paint low volume bar black anniebee321 NinjaTrader 4 December 19th, 2010 04:58 AM
can you get a horizontal line at the current high of the volume indicator anniebee321 NinjaTrader 4 December 10th, 2010 06:18 PM


All times are GMT -4. The time now is 07:10 AM.

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-18 in 0.11 seconds with 19 queries on phoenix via your IP 54.163.209.109