How to reference a chart's indicators when coding in MultiCharts? - MultiCharts | futures io social day trading
futures io futures trading


How to reference a chart's indicators when coding in MultiCharts?
Updated: Views / Replies:852 / 3
Created: by jesse514 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
 

How to reference a chart's indicators when coding in MultiCharts?

  #1 (permalink)
Trading Apprentice
Montreal, QC
 
Futures Experience: Intermediate
Platform: MultiCharts, Ensign, Sierra, IB/TWS
Favorite Futures: CL
 
Posts: 11 since Apr 2014
Thanks: 5 given, 5 received

How to reference a chart's indicators when coding in MultiCharts?

Novice question: I have added studies to a chart and would like to build a strategy (signal) to trade based on them. For example, I have "Mov Avg 1 Line" on my chart. I would like to place a BUY STP order 1 cent above that signal's value (assuming price is currently lower than that value), and update the BUY STP price whenever that indicator's value changes (at the close of each bar, when the MA gets recalculated).

I'm sure there will be a few challenges but the first one is how to reference the price of that indicator, which has already been added to the chart? Or do I need to reproduce that indicator within the code?

I will need to code the following logic:

If Close is lower than "Mov Avg 1 Line" value, place BUY STP at "Mov Avg 1 Line" value + 1 tick

I can tell my next problem will be how to place a BUY STP at a certain price, in advance, and then update that order at the close of each bar, since it seems most example strategies use "buy next bar at market" which is not what I want. Thanks guys!

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,529 since Apr 2013
Thanks: 230 given, 854 received
Forum Reputation: Legendary

jesse514,

you will have to reproduce the code within the signal and can't reference the indicators on the chart directly.
When you open the code for the "Mov Avg 1 Line" the top lines are the ones necessary for calculating the average.
 
Code
inputs:  Price( Close ), Length( 9 ), Displace( 0 ) ;
variables:  var0( 0 ) ;
	
var0 = AverageFC( Price, Length ) ;
Change var0 will something more meaningful like vAverage, so you can find your way around your code better.
The code below is a demonstration on how you could code what you have in mind and is not meant for live trading:
 
Code
inputs:  Price( Close ), Length( 9 ), EntryOffSetInTicks( 1 ) ;
variables:  vAverage ( 0 ) , vOneTick ( 0 ), EntryOffSet ( 0 );

//compute minimum move and order offset
once
begin
	vOneTick = MinMove / PriceScale ;
	EntryOffSet = vOneTick * EntryOffSetInTicks ;
end;
	
//compute average
vAverage = AverageFC( Price, Length ) ;

//send order
if Close < vAverage then	
	Buy ("Long") next bar vAverage + EntryOffSet stop;
Regards,
ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #3 (permalink)
Trading Apprentice
Montreal, QC
 
Futures Experience: Intermediate
Platform: MultiCharts, Ensign, Sierra, IB/TWS
Favorite Futures: CL
 
Posts: 11 since Apr 2014
Thanks: 5 given, 5 received


ABCTG,

That's incredibly helpful, thank you. I was just using a Powerlanguage tutorial on your website yesterday so it's very cool to be talking to you on here. This gives me a lot to work with for now.

Jesse

Reply With Quote
The following user says Thank You to jesse514 for this post:
 
  #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,529 since Apr 2013
Thanks: 230 given, 854 received
Forum Reputation: Legendary

Jesse,

thanks for letting me know. If you have any questions regarding the code just post back here.

Regards,
ABCTG


jesse514 View Post
ABCTG,

That's incredibly helpful, thank you. I was just using a Powerlanguage tutorial on your website yesterday so it's very cool to be talking to you on here. This gives me a lot to work with for now.

Jesse


Reply With Quote

Reply



futures io > > > > How to reference a chart's indicators when coding in MultiCharts?

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
MultiCharts and MultiCharts .NET: where are indicators more performant? GoSlow MultiCharts 3 February 3rd, 2014 02:33 AM
Multicharts .NET reference guide? grimReaper MultiCharts 3 April 19th, 2013 01:55 AM
Two Instruments on same chart - how to reference each one in EasyLanguage KhaosTrader EasyLanguage Programming 5 August 24th, 2012 02:21 PM
Getting reference to NT7 internal like ToolBar or Chart Trader column Adamus NinjaTrader Programming 6 November 17th, 2011 06:45 PM
Need info on coding a reference to another indicator Saroj NinjaTrader Programming 8 October 21st, 2009 02:32 AM


All times are GMT -4. The time now is 06:47 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-13 in 0.08 seconds with 19 queries on phoenix via your IP 54.90.92.204