Trouble with buy code. Help/Ideas? - EasyLanguage Programming | futures io social day trading
futures io futures trading


Trouble with buy code. Help/Ideas?
Updated: Views / Replies:1,463 / 20
Created: by Dallasboy Attachments:5

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
 5  
 
Thread Tools Search this Thread
 

Trouble with buy code. Help/Ideas?

  #11 (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


Dallasboy View Post
Thanks ABCTG!
Still think there is something I am not yet thinking about.

Dallasboy,

you are welcome. You can add print statements to your code to check the value your variable has on ever bar.
This should give you some insights into what is going on internally.

Something like this might get you going:
 
Code
Print( DateTimeToString( DateTime ), "; BuyBelow: ", BuyBelow ) ;
Regards,

ABCTG

Reply With Quote
The following 2 users say Thank You to ABCTG for this post:
 
  #12 (permalink)
Trading Apprentice
dallas texas
 
Futures Experience: Advanced
Platform: NinjaTrader, Ensign, MC
Favorite Futures: ES
 
Posts: 13 since Jan 2016
Thanks: 6 given, 2 received

ABCTG,

Thanks and a great idea...never used this before. So inserted your code in mine and compiled, but not seeing anything new on the charts to check the variable on each bar. BTW I'm using MC.

Thanks!

Edit: I see it now in the output window...is there any way to put that in the data window on the chart? And how to expand the decimals? For exmaple, in the EUR it gives me outputs in 1.14 format, how to get it in 1.14000 ?


Last edited by Dallasboy; June 21st, 2016 at 06:13 PM.
Reply With Quote
 
  #13 (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


Dallasboy,

you would have to plot the values to make them visible in the data window, this won't work with a print.
Using plots is also a good way to make things visible on the chart - even values from a system, just look into the SetPlotValue and GetPlotValue reserved words.

You can find the various print options, including how to add more decimals in the Multicharts wiki.

By the way you can show your appreciation for a post here on Futures.io using the "Thanks" button under it.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #14 (permalink)
Trading Apprentice
dallas texas
 
Futures Experience: Advanced
Platform: NinjaTrader, Ensign, MC
Favorite Futures: ES
 
Posts: 13 since Jan 2016
Thanks: 6 given, 2 received

Hi ABCTG,

So I added this to the signal code:

i_setplotvalue(111, BuyBelow);
i_getplotvalue(111);

But when I try to plot (via a Plot1 function), it gives an error you can't plot from a signal study.

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

Dallasboy,

it's correct that you can't plot from strategies. That's why you can use i_setplotvalue in the strategy to send a value to an indicator on the same chart. The indicator has to use i_getplotvalue to access the value and you can plot this value then using a regular plot reserved word.
Plotting directly from the strategy will not work unfortunately.

Regards,

ABCTG

Reply With Quote
 
  #16 (permalink)
Trading Apprentice
dallas texas
 
Futures Experience: Advanced
Platform: NinjaTrader, Ensign, MC
Favorite Futures: ES
 
Posts: 13 since Jan 2016
Thanks: 6 given, 2 received


ABCTG View Post
Dallasboy,

it's correct that you can't plot from strategies. That's why you can use i_setplotvalue in the strategy to send a value to an indicator on the same chart. The indicator has to use i_getplotvalue to access the value and you can plot this value then using a regular plot reserved word.
Plotting directly from the strategy will not work unfortunately.

Regards,

ABCTG

OK, let me get this straight: I put a random indicator on my chart, and within that script I use the i_getplotvalue to retrieve the value from my signal script and then I can plot it either on the chart or data window?

Any chance on how this code would look like?

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

Dallasboy,

assuming you have this line added to your signal:
 
Code
i_setplotvalue(111, BuyBelow);
Then a simple one line indicator (simply create a brand new one, name it whatever you like) will do it:
 
Code
Plot1(i_getplotvalue(111), "BuyBelow");
Now you simply have to apply both to the same chart and it should work.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #18 (permalink)
Trading Apprentice
dallas texas
 
Futures Experience: Advanced
Platform: NinjaTrader, Ensign, MC
Favorite Futures: ES
 
Posts: 13 since Jan 2016
Thanks: 6 given, 2 received

Hi ABCTG,

Thanks for the help on plotting values! I'm still trying to figure out why sometimes the code doesn't seem to abide by the rules. Again, the way the buy works is to trigger on the value of BuyBelow which is setup and defined by the higher swing lows (see charts). I have keep IOG true and 1 in 4 or so setups does not trigger. In chart "buyissue", you can see 2 well defined buy setups and executions, with the third not triggering...AND, the BuyBelow value is valid and doesn't change.

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



So, I did turn off IOG and now trade #3 works (chart "buyissue2"), but IOG shouldn't matter in these trades as they setup 2+ bars after the higher swing (BuyBelow).

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).



Again, thanks for your help and advice!

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

Dallasboy,

I am afraid one can only guess without going through your code and investing some time in debugging it.

As I have pointed out you can use the I_setplotvalue and I_getplotvalue reserved words to check the values that are used for the entries. You can also use Print statements to analyze situations in the code. Check the actual entry prices that are used for triggering the orders, check that the same order is not used again etc..
This will likely be the road you have to take to track the cause down.

Regards,

ABCTG

Reply With Quote
The following user says Thank You to ABCTG for this post:
 
  #20 (permalink)
Trading Apprentice
dallas texas
 
Futures Experience: Advanced
Platform: NinjaTrader, Ensign, MC
Favorite Futures: ES
 
Posts: 13 since Jan 2016
Thanks: 6 given, 2 received


ABCTG,

Thanks for all your help. Looks like I found the bug...more to learn ;-)

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

Reply



futures io > > > > > Trouble with buy code. Help/Ideas?

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
Easylanguage/Multicharts still buying next bar even no more code to buy signal! risaldeb MultiCharts 14 May 27th, 2015 10:56 AM
market profile code trouble with tradestation rmiller863 EasyLanguage Programming 1 October 8th, 2013 11:04 AM
Buy / Sell Code Problem resirca52009 MetaTrader 3 November 12th, 2012 10:02 AM
How to code a "buy 1 lot (forex)" in EL Arich EasyLanguage Programming 2 September 16th, 2012 04:00 AM
New Guy Question => Difference between Buy Ask and Buy Bid? Cisco NinjaTrader 8 March 20th, 2012 11:42 PM


All times are GMT -4. The time now is 10:21 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-15 in 0.13 seconds with 20 queries on phoenix via your IP 54.221.76.68