NexusFi: Find Your Edge


Home Menu

 





How to place a stop loss on the entry bar in EasyLanguage


Discussion in Traders Hideout

Updated
    1. trending_up 4,435 views
    2. thumb_up 5 thanks given
    3. group 3 followers
    1. forum 10 posts
    2. attach_file 1 attachments




 
Search this Thread

How to place a stop loss on the entry bar in EasyLanguage

  #1 (permalink)
 SidewalkAerobics 
Los Angels
 
Experience: Intermediate
Platform: MultiChart
Trading: Emini ES
Posts: 115 since Aug 2018
Thanks Given: 173
Thanks Received: 71

How to place a stop loss/ profit with the entry.

In EasyLanguage the code enters on the next bar. How can I place a StopLoss and a Target at the same time?

The goal is to be able to hit the target during the entry bar.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
REcommedations for programming help
Sierra Chart
NexusFi Journal Challenge - May 2024
Feedback and Announcements
ZombieSqueeze
Platforms and Indicators
Better Renko Gaps
The Elite Circle
Trade idea based off three indicators.
Traders Hideout
 
  #2 (permalink)
 SidewalkAerobics 
Los Angels
 
Experience: Intermediate
Platform: MultiChart
Trading: Emini ES
Posts: 115 since Aug 2018
Thanks Given: 173
Thanks Received: 71

Does anyone use Power Language? Looking for a tutorial. (Learning with a C# background)

Started this thread Reply With Quote
  #3 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86



SidewalkAerobics View Post
How to place a stop loss/ profit with the entry.

In EasyLanguage the code enters on the next bar. How can I place a StopLoss and a Target at the same time?

The goal is to be able to hit the target during the entry bar.

SetStoploss() should work on the entry bar.

Reply With Quote
Thanked by:
  #4 (permalink)
 SidewalkAerobics 
Los Angels
 
Experience: Intermediate
Platform: MultiChart
Trading: Emini ES
Posts: 115 since Aug 2018
Thanks Given: 173
Thanks Received: 71


edgefirst View Post
SetStoploss() should work on the entry bar.

Using SetStoploss and SetProfitTarget do not place limit orders until the bar AFTER entry. On the entry bar, price can move through the stop or limit.

Do I need to adjust a setting?

Started this thread Reply With Quote
  #5 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86


SidewalkAerobics View Post
Using SetStoploss and SetProfitTarget do not place limit orders until the bar AFTER entry. On the entry bar, price can move through the stop or limit.

Do I need to adjust a setting?

A simple example.


 
Code
if C > Highest(C, 20)[1] then buy next bar at market;

SetStoploss(400);
SetProfitTarget(500);

Reply With Quote
Thanked by:
  #6 (permalink)
 SidewalkAerobics 
Los Angels
 
Experience: Intermediate
Platform: MultiChart
Trading: Emini ES
Posts: 115 since Aug 2018
Thanks Given: 173
Thanks Received: 71


edgefirst View Post
A simple example.


 
Code
if C > Highest(C, 20)[1] then buy next bar at market;

SetStoploss(400);
SetProfitTarget(500);

Thanks for the picture

Do you update at the close of a bar or continuously?

Started this thread Reply With Quote
  #7 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86


SidewalkAerobics View Post
Do you update at the close of a bar or continuously?

On the close. No IOG used.

Reply With Quote
Thanked by:
  #8 (permalink)
 SidewalkAerobics 
Los Angels
 
Experience: Intermediate
Platform: MultiChart
Trading: Emini ES
Posts: 115 since Aug 2018
Thanks Given: 173
Thanks Received: 71


edgefirst View Post
On the close. No IOG used.

What setting are use to enable a reversal (multiple times) in the same bar on Multicharts?

I see the same bar reversals in the backtest, but do not see live orders for them when trading.

Started this thread Reply With Quote
  #9 (permalink)
 edgefirst 
Las Cruces, NM
 
Experience: Advanced
Platform: Tradestation, MC, NT
Broker: TradeStation, IB
Trading: Liquid futures contracts
Posts: 56 since Sep 2009
Thanks Given: 389
Thanks Received: 86


SidewalkAerobics View Post
What setting are use to enable a reversal (multiple times) in the same bar on Multicharts?

I see the same bar reversals in the backtest, but do not see live orders for them when trading.

It has been a long time since last time I used MC for live trading. In TradeStation, live trading matches simulation quite well.

Reply With Quote
Thanked by:
  #10 (permalink)
 SidewalkAerobics 
Los Angels
 
Experience: Intermediate
Platform: MultiChart
Trading: Emini ES
Posts: 115 since Aug 2018
Thanks Given: 173
Thanks Received: 71



edgefirst View Post
It has been a long time since last time I used MC for live trading. In TradeStation, live trading matches simulation quite well.


Thanks edgefirst! Does Tradestation simulation show similar slippage results as live algo trading?

Any input you can provide on Tradestation would be appreciated.

Started this thread Reply With Quote




Last Updated on October 12, 2020


© 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