NexusFi: Find Your Edge


Home Menu

 





Stoploss and entryprice


Discussion in MultiCharts

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




 
Search this Thread

Stoploss and entryprice

  #1 (permalink)
 manev31 
Switzerland
 
Experience: Intermediate
Platform: Tradestation, Python
Trading: Forex
Posts: 12 since Aug 2014
Thanks Given: 2
Thanks Received: 1

I have an issue with multicharts stoploss. In a simple code like this:


If marketposition < 1 and close > open then buy next bar at market;
Setstoploss(100);
Setprofitarget(200);

My problem is that Multicharts use my brokers entry price as a base to calculate the stoploss.
When there is no slippage it is OK, but when the entry price on my chart differs from the
entry price at my broker then Multicharts uses the broker entry position. For example on
ES contract if the strategy has opened long position at 2780.00 and there was a slippage and the
brokers opening price was 2780.25 then the stoploss of $100 which is 2 ES points is placed
at 2778.25 although the strategy stoploss should be at 2778.00. The same is happening with the
profit target.
is there a way to avoid this and use the entry price on my chart as a base for my stoploss and profit target?

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Increase in trading performance by 75%
The Elite Circle
ZombieSqueeze
Platforms and Indicators
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Just another trading journal: PA, Wyckoff & Trends
31 thanks
Tao te Trade: way of the WLD
24 thanks
My NQ Trading Journal
14 thanks
GFIs1 1 DAX trade per day journal
11 thanks
Diary of a simple price action trader
10 thanks
  #2 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

manev31,

you could for example use SA mode for the strategy. Another option could be not to use the built-in exit reserved words, but to use a stop order and limit order for the exits. The latter would allow you to specify a price, but it might require intrabar order generation for the ability to have the stop and target in place during the entry bar already.

Regards,

ABCTG

Follow me on Twitter Reply With Quote
  #3 (permalink)
 manev31 
Switzerland
 
Experience: Intermediate
Platform: Tradestation, Python
Trading: Forex
Posts: 12 since Aug 2014
Thanks Given: 2
Thanks Received: 1


I use AA mode and what I described is happening in AA mode. The problem when I use IOG with stop and limit orders is
that the strategies itself are not the same anymore. For example if position exits then there is an entry on the same bar although the strategy should entry position on the next bar after the exit.

Is there specific setting in AA mode that should allow me to that?

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

manev31,

sorry for the confusion, this should have read SA mode (I have edited my post below). Using SA mode will likely not correct the situation you are seeing, though, the entries would just use same stop, but using your fill price.

You can use IOG mode and still only issue orders at the end of the bar for entries, but you would have to adjust your code for that.

Regards,

ABCTG


manev31 View Post
I use AA mode and what I described is happening in AA mode. The problem when I use IOG with stop and limit orders is
that the strategies itself are not the same anymore. For example if position exits then there is an entry on the same bar although the strategy should entry position on the next bar after the exit.

Is there specific setting in AA mode that should allow me to that?


Follow me on Twitter Reply With Quote
Thanked by:
  #5 (permalink)
 manev31 
Switzerland
 
Experience: Intermediate
Platform: Tradestation, Python
Trading: Forex
Posts: 12 since Aug 2014
Thanks Given: 2
Thanks Received: 1

SA mode is a little bit confusing for me since it is erasing the previous entries and it is a little hard to track the strategy.
It seems like the only viable solutions in AA mode is to use IOG and to modify the code for that purpose.
Thanks a lot .

Started this thread Reply With Quote
  #6 (permalink)
 manev31 
Switzerland
 
Experience: Intermediate
Platform: Tradestation, Python
Trading: Forex
Posts: 12 since Aug 2014
Thanks Given: 2
Thanks Received: 1

I managed to to make a code that works:


 
Code
 [intrabarordergeneration=true]

If marketposition < 1 and close > open or Close < open then BUY this bar at close;

If marketposition=1 then begin
Sell next bar at (entryprice - 1) stop; // StopLoss
Sell next bar at (entryprice + 2) limit; // Take profit
end;
When IOG is enabled in Multicharts next bar at market means next tick but this bar at close
really means close of the bar. Does anyone have solution how can I code real next bar at market
with IOG enabled? I know that this bar at close is almost the same but it would be nice if someone have some
simple solution.

Started this thread Reply With Quote
  #7 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

manev31,

take a look at the reserved word BarStatus. You can use this to issue an order at the closing tick of a bar only.

Regards,

ABCTG


manev31 View Post
I managed to to make a code that works:


 
Code
 [intrabarordergeneration=true]

If marketposition < 1 and close > open or Close < open then BUY this bar at close;

If marketposition=1 then begin
Sell next bar at (entryprice - 1) stop; // StopLoss
Sell next bar at (entryprice + 2) limit; // Take profit
end;
When IOG is enabled in Multicharts next bar at market means next tick but this bar at close
really means close of the bar. Does anyone have solution how can I code real next bar at market
with IOG enabled? I know that this bar at close is almost the same but it would be nice if someone have some
simple solution.


Follow me on Twitter Reply With Quote




Last Updated on August 21, 2019


© 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