NexusFi: Find Your Edge


Home Menu

 





Stop & Reverse


Discussion in TradeStation

Updated
    1. trending_up 3,433 views
    2. thumb_up 0 thanks given
    3. group 2 followers
    1. forum 8 posts
    2. attach_file 0 attachments




 
Search this Thread

Stop & Reverse

  #1 (permalink)
 ausstone 
Miami, FL / USA
 
Experience: Intermediate
Platform: MultiCharts
Trading: Futures, Forex
Posts: 14 since Feb 2013
Thanks Given: 0
Thanks Received: 2

i have a strategy that is stop and reverse and I want to place a limit exit, however when i do this once the strategy exits it position it will automatically get right back into the long or short position. I tried to put code in that says "if marketposition <> -1 then begin" but then the strategy generates no trades... how can i prevent a strategy from automatically re-entering in the same direction? The goals is to take the Long Short Strategy and place limit exists but once a short or long achieves its exit not to entry until the next trade... which if long would be short and vis-versa.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
ZombieSqueeze
Platforms and Indicators
Cheap historycal L1 data for stocks
Stocks and ETFs
About a successful futures trader who didnt know anythin …
Psychology and Money Management
Better Renko Gaps
The Elite Circle
What broker to use for trading palladium futures
Commodities
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

ausstone,

you could store the previous market position of the entry and then check this against the new entry. Another idea would be to use the exit name and make sure the last exit wasn't a long limit exit in case you want to enter long.
The latter requires OOEL, but the first idea is fairly simple. The only thing to keep in mind is that you only want to store the previous market position if you are long or short and not if your are flat.

Regards,
ABCTG


ausstone View Post
i have a strategy that is stop and reverse and I want to place a limit exit, however when i do this once the strategy exits it position it will automatically get right back into the long or short position. I tried to put code in that says "if marketposition <> -1 then begin" but then the strategy generates no trades... how can i prevent a strategy from automatically re-entering in the same direction? The goals is to take the Long Short Strategy and place limit exists but once a short or long achieves its exit not to entry until the next trade... which if long would be short and vis-versa.


Follow me on Twitter Reply With Quote
  #3 (permalink)
 ausstone 
Miami, FL / USA
 
Experience: Intermediate
Platform: MultiCharts
Trading: Futures, Forex
Posts: 14 since Feb 2013
Thanks Given: 0
Thanks Received: 2


is there any possible way to have an underlying stop and reverse strategy and on top of that overlay a exit management strategy with out effecting entries for the main strategy?

thanks

Started this thread Reply With Quote
  #4 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

ausstone,

that would depend on the main strategy. In your case I guess not without modifications like I explained in the post above.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
  #5 (permalink)
 ausstone 
Miami, FL / USA
 
Experience: Intermediate
Platform: MultiCharts
Trading: Futures, Forex
Posts: 14 since Feb 2013
Thanks Given: 0
Thanks Received: 2

i did something like this:

 
Code
if exitname(1) <> "Ex_Long" then begin  
LOGIC LOGIC then buy ("E_Long") amount contracts next bar  at market;
end;

if exitname(1) <> "Ex_Short" then begin 
LOGIC LOGIC then sellshort("E_Short")  amount contracts next bar  at market;
end;

if openpositionprofit > 1000 then begin
	sell ("Ex_Long")Next Bar At market;
	BuyToCover ("Ex_Short")Next Bar At market;
	end;
but it does not seem to make a different... it still exits and just re entries.. i tried to find a posting about this but no luck

Started this thread Reply With Quote
  #6 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

To make sure, are you using Multicharts or Tradestation?

Follow me on Twitter Reply With Quote
  #7 (permalink)
 ausstone 
Miami, FL / USA
 
Experience: Intermediate
Platform: MultiCharts
Trading: Futures, Forex
Posts: 14 since Feb 2013
Thanks Given: 0
Thanks Received: 2

multicharts

Started this thread Reply With Quote
  #8 (permalink)
 ausstone 
Miami, FL / USA
 
Experience: Intermediate
Platform: MultiCharts
Trading: Futures, Forex
Posts: 14 since Feb 2013
Thanks Given: 0
Thanks Received: 2

i got it working with the following code:

 
Code
///// this part starts the strategy other wise there will be no orders generated.
if BarNumber < 100 then begin
LOGIC LOGIC then buy ("E_Long1") amount contracts next bar  at market; 
LOGIC LOGIC then sellshort("E_Short1")  amount contracts next bar  at market;
end;  
//////end


if exitname(1) = ("Ex_Short") or entryname = ("E_Short") then begin  
LOGIC LOGIC then buy ("E_Long") amount contracts next bar  at market;
end;

if exitname(1) = ("Ex_Long") or entryname = ("E_Long")  then begin  
LOGIC LOGIC then sellshort("E_Short")  amount contracts next bar  at market;
end;

if openpositionprofit > 1000 then begin
	sell ("Ex_Long")Next Bar At market;
	BuyToCover ("Ex_Short")Next Bar At market;
	end;

Started this thread Reply With Quote
  #9 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Great. Another thing that should work for you is using flags that allow/block the entries.
Something along the lines of this:
 
Code
Variables:
LongAllowed(true),
ShortAllowed(true);

LOGIC LOGIC and LongAllowed then begin
LongAllowed = false ;
ShortAllowed = true ;
buy ("E_Long") amount contracts next bar  at market;
end;


LOGIC LOGIC and ShortAllowed then begin
LongAllowed = true ;
ShortAllowed = false ;
sellshort("E_Short")  amount contracts next bar  at market;
end;

if openpositionprofit > 1000 then begin
	sell ("Ex_Long")Next Bar At market;
	BuyToCover ("Ex_Short")Next Bar At market;
	end;
Regards,
ABCTG


ausstone View Post
i got it working with the following code:

 
Code
///// this part starts the strategy other wise there will be no orders generated.
if BarNumber < 100 then begin
LOGIC LOGIC then buy ("E_Long1") amount contracts next bar  at market; 
LOGIC LOGIC then sellshort("E_Short1")  amount contracts next bar  at market;
end;  
//////end


if exitname(1) = ("Ex_Short") or entryname = ("E_Short") then begin  
LOGIC LOGIC then buy ("E_Long") amount contracts next bar  at market;
end;

if exitname(1) = ("Ex_Long") or entryname = ("E_Long")  then begin  
LOGIC LOGIC then sellshort("E_Short")  amount contracts next bar  at market;
end;

if openpositionprofit > 1000 then begin
	sell ("Ex_Long")Next Bar At market;
	BuyToCover ("Ex_Short")Next Bar At market;
	end;


Follow me on Twitter Reply With Quote




Last Updated on June 12, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts