NexusFi: Find Your Edge


Home Menu

 





LIMIT/STOP Order instad of SL/TP


Discussion in MultiCharts

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




 
Search this Thread

LIMIT/STOP Order instad of SL/TP

  #1 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4

Hi guys, my question is very simple:

there s a way to set stoploss and profittarget using STOP and LIMIT order ?

for example i would like to do something like this:


if ( marketposition = 0 and condition4 and condition5) then BEGIN

buy ("Long EURUSD") 100000 contracts next bar at open;
sell ("sell SL 1 ") 100000 contracts next bar at C-stoploss1 stop;
sell ("sell TP 1 ") 50000 contracts next bar at C+takeprofit1 limit;
sell ("sell TP 2 ") 50000 contracts next bar at C+takeprofit2 limit;
END;

Using 1 stoploss and 2 takeprofit.

Thank you very much about all answer

No Erocla

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
REcommedations for programming help
Sierra Chart
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
 
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,436 since Apr 2013
Thanks Given: 482
Thanks Received: 1,629

Yes, you can do this. However with your MC would close out the whole position at your target and ignore the contracts.
You just need to slightly modify your code this this and it should work fine:
 
Code
if ( marketposition = 0 and condition4 and condition5) then BEGIN

buy ("Long EURUSD1") 50000 contracts next bar at open;
buy ("Long EURUSD2") 50000 contracts next bar at open;
end;
if MarketPosition > 0 then
begin
sell ("sell SL 1 ") all contracts next bar at C-stoploss1 stop;

sell ("sell TP 1 ") 50000 contracts from Entry ("Long EURUSD1") next bar at C+takeprofit1 limit;
sell ("sell TP 2 ") 50000 contracts from Entry ("Long EURUSD1") next bar at C+takeprofit2 limit;
END;
You might have to change some settings to allow more than trade per bar or in the same direction if you only see one entry. Another thing to consider is using intrabar order generation so your stops and targets are available directly after the entry.

Regards,
ABCTG

Follow me on Twitter Reply With Quote
Thanked by:
  #3 (permalink)
no erocla
turin italy
 
Posts: 96 since May 2013
Thanks Given: 43
Thanks Received: 4



ABCTG View Post
Yes, you can do this. However with your MC would close out the whole position at your target and ignore the contracts.
You just need to slightly modify your code this this and it should work fine:
 
Code
if ( marketposition = 0 and condition4 and condition5) then BEGIN

buy ("Long EURUSD1") 50000 contracts next bar at open;
buy ("Long EURUSD2") 50000 contracts next bar at open;
end;
if MarketPosition > 0 then
begin
sell ("sell SL 1 ") all contracts next bar at C-stoploss1 stop;

sell ("sell TP 1 ") 50000 contracts from Entry ("Long EURUSD1") next bar at C+takeprofit1 limit;
sell ("sell TP 2 ") 50000 contracts from Entry ("Long EURUSD1") next bar at C+takeprofit2 limit;
END;
You might have to change some settings to allow more than trade per bar or in the same direction if you only see one entry. Another thing to consider is using intrabar order generation so your stops and targets are available directly after the entry.

Regards,
ABCTG

Thank you very much,

what happen using IOG ? i never used it before.

Close is Tick or still remain close ?
My systems works on close price, i've to "ref" them to 1 bar ago ? (Close[1] , atr(14)[1] etc..).

Thank you again !

No Erocla.

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

You are welcome. IOG is a more complex task when dealing with signals. For example orders that are specified at "next bar" become available at the next tick. So when you specify
 
Code
Buy next bar Close limit;
This would mean send a limit order for the next tick using the value for close of the current tick.

If you haven't used it before there probably is no reason for that with your signal then.

Regards,

ABCTG


no erocla View Post
Thank you very much,

what happen using IOG ? i never used it before.

Close is Tick or still remain close ?
My systems works on close price, i've to "ref" them to 1 bar ago ? (Close[1] , atr(14)[1] etc..).

Thank you again !

No Erocla.


Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on December 3, 2013


© 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