Buy 1 contract next bar - EasyLanguage Programming | futures io social day trading
futures io futures trading


Buy 1 contract next bar
Updated: Views / Replies:540 / 5
Created: by tradingest 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
 

Buy 1 contract next bar

  #1 (permalink)
Elite Member
Milan (Italy)
 
Futures Experience: Advanced
Platform: TradeStation, MC, TWS
Broker/Data: TradeStation, IB
Favorite Futures: Futures, Forex
 
tradingest's Avatar
 
Posts: 96 since Dec 2014
Thanks: 5 given, 9 received

Buy 1 contract next bar

Hi all,
I can't buy when the price break the pivotH after 3 bars. How Can I make?
Below my code and image where I want the signal buy but this condition verify after 3 bars.

Image - PivotH

Someone can help me?

Thanks,
tradingest

Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #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


tradingest,

I don't see your code in your image, if you can post it I might be able to steer you into the right direction.

Regards,

ABCTG

Reply With Quote
 
  #4 (permalink)
Elite Member
Milan (Italy)
 
Futures Experience: Advanced
Platform: TradeStation, MC, TWS
Broker/Data: TradeStation, IB
Favorite Futures: Futures, Forex
 
tradingest's Avatar
 
Posts: 96 since Dec 2014
Thanks: 5 given, 9 received


ABCTG View Post
tradingest,

I don't see your code in your image, if you can post it I might be able to steer you into the right direction.

Regards,

ABCTG

Here is my code:

 
Code
Inputs: 
	PriceL(Low),
	LeftStrengthL(3), 
	RightStrengthL(3),
	PriceH(High),
	LeftStrengthH(3), 
	RightStrengthH(3);
	
Variable:
	PivotL(0), PivotH(0), 
	SMA(0), 
	BuyFlag3(false),	
	N(1), MP(0);
	
MP = MarketPosition;

SMA = Average(C,50);


if PivotHighVSBar( 1, PriceH, LeftStrengthH, RightStrengthH, RightStrengthH + 1 ) <> -1
Then Begin
	PivotH = High[RightStrengthH];
	BuyFlag3 = true;
End;



If MP = 0
Then Begin
	If BuyFlag3 = true //and PivotH > SMA
	Then Begin
		Buy N contract next bar at PivotH + 1 point stop;
		BuyFlag3 = false;
	End;
End;

Setprofittarget(1000*N);
Setstoploss(1000*N)

Thanks a lot,
tradingest

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

tradingest,

you reset your BuyFlag3 at the time you send your order. This means on the next bar, the order condition wouldn't be fulfilled anymore and therefore your order would be cancelled, unless filled before of course.
The easiest way might be to store the bar number at the time you set the flag to true and when CurrentBar > SavedBarNumber + X (where X would be the number of bars the order should be valid) or the MarketPosition > 0 (which would indicate an entry), you set the buy flag to false.

Regards,

ABCTG

Reply With Quote
 
  #6 (permalink)
Elite Member
Milan (Italy)
 
Futures Experience: Advanced
Platform: TradeStation, MC, TWS
Broker/Data: TradeStation, IB
Favorite Futures: Futures, Forex
 
tradingest's Avatar
 
Posts: 96 since Dec 2014
Thanks: 5 given, 9 received


ABCTG View Post
tradingest,

you reset your BuyFlag3 at the time you send your order. This means on the next bar, the order condition wouldn't be fulfilled anymore and therefore your order would be cancelled, unless filled before of course.
The easiest way might be to store the bar number at the time you set the flag to true and when CurrentBar > SavedBarNumber + X (where X would be the number of bars the order should be valid) or the MarketPosition > 0 (which would indicate an entry), you set the buy flag to false.

Regards,

ABCTG

Hi ABCTG,

you could help me to write the code.
I can not express what you have written to me

Thanks,
tradingest

Reply With Quote

Reply



futures io > > > > > Buy 1 contract next bar

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
buy next bar... and set stop immediately and not for the bar after Nicolas11 EasyLanguage Programming 12 September 18th, 2017 05:43 AM
Buy/Sell at the closing of current rang bar lexxmd Platforms and Indicators 3 December 24th, 2014 08:51 PM
How to enter long buy on a bar immediately before it closes. bmtfken EasyLanguage Programming 19 July 27th, 2014 08:01 PM
automated buy order on specific size bar close ncsutrader Elite Automated NinjaTrader Trading 3 May 27th, 2013 11:24 AM
Outside Bar buy or sell ness1g NinjaTrader 7 March 7th, 2012 07:18 PM


All times are GMT -4. The time now is 04:18 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-17 in 0.10 seconds with 19 queries on phoenix via your IP 54.227.51.103