Very confused---stop wont move with the candles - MetaTrader | futures io social day trading
futures io futures trading


Very confused---stop wont move with the candles
Updated: Views / Replies:637 / 0
Created: by bondstrader 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
 

Very confused---stop wont move with the candles

  #1 (permalink)
Trading Apprentice
Dubai, UAE
 
Futures Experience: Advanced
Platform: Multicharts
Favorite Futures: Gold
 
Posts: 10 since Sep 2014
Thanks: 2 given, 1 received

Very confused---stop wont move with the candles

Hopefully someone can help me out of this.
In the following code opening a long position if the current price is higher than the previous candle's High.
Then I set a profit target, and a stop loss. The profit target is static, so that works fine, but the stop loss is variable. I have set it to look for the lowest price of the last 5 candles, and set that as a stop loss. However, in my code, what it does is that it sets the stop loss based on the lowest price of the 5 candles before the trade candle, and fixes it at that value.
I want the stop to keep on moving with each candle, i-e, after each candle, it evaluates the lowest value of the last 5 candles and sets the stop as that....
Any ideas on what Im missing, or what I need to add to the following code to achieve that?

 
Code
	OrderSelect(LongTicket,SELECT_BY_TICKET);
		
		if (OrderCloseTime() != 0 || LongTicket == 0)
		{    

bool buy_condition_1 = Ask >= High[1]; 

 if( buy_condition_1)
			{
							
		      LongTicket = OrderSend(Symbol(),OP_BUY,LotSize,Ask,0,0,0,"Buy Order",MagicNumber,0,Green);
		      OrderSelect(LongTicket,SELECT_BY_TICKET); 
		      double OpenPrice = OrderOpenPrice();
                      double LongStopLoss =  Low[iLowest(NULL,0,MODE_LOW,5,1)];
                      double LongTakeProfit = OpenPrice + (TakeProfit * TickPoints);
            
				if(LongStopLoss > 0 || LongTakeProfit > 0) 
				{
                       bool LongMod = OrderModify(OrderTicket(),OpenPrice,LongStopLoss, LongTakeProfit,0);
				}
		
			}
		}

Reply With Quote

Reply



futures io > > > > Very confused---stop wont move with the candles

Thread Tools Search this Thread
Search this Thread:

Advanced Search



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

Linda Bradford Raschke: Reading The Tape

Elite only

Adam Grimes: TBA

Elite only

NinjaTrader: TBA

January

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Move stop loss after profit target is reached tbird NinjaTrader 3 August 28th, 2015 04:45 PM
What does it mean to move stop to break even shots fired Emini Index Futures Trading 11 July 3rd, 2013 11:41 PM
Ninjatrader candles wont update ncsutrader NinjaTrader 2 December 20th, 2012 03:19 PM
on NT7 - Anyway to make market replay have orders sit on the dom/ move stop loss? Itchymoku NinjaTrader 4 May 13th, 2012 02:50 AM
MOVE STOP LOSS AFTER STRATEGY firecan NinjaTrader Programming 2 December 13th, 2010 06:54 AM


All times are GMT -4. The time now is 05:54 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-12 in 0.23 seconds with 19 queries on phoenix via your IP 54.167.44.32