NexusFi: Find Your Edge


Home Menu

 





Setting StopLoss in Easy Language via Variable1-99 (calculated live)


Discussion in MultiCharts

Updated
      Top Posters
    1. looks_one ABCTG with 4 posts (1 thanks)
    2. looks_two jamesfisher with 4 posts (0 thanks)
    3. looks_3 buggyboy with 3 posts (0 thanks)
    4. looks_4 Nicolas11 with 3 posts (1 thanks)
    1. trending_up 14,945 views
    2. thumb_up 3 thanks given
    3. group 4 followers
    1. forum 14 posts
    2. attach_file 0 attachments




 
Search this Thread

Setting StopLoss in Easy Language via Variable1-99 (calculated live)

  #11 (permalink)
 ABCTG   is a Vendor
 
Posts: 2,433 since Apr 2013
Thanks Given: 481
Thanks Received: 1,627

jamesfisher,

you can use the Marketposition reserved word to check that the first entry is only taken when flat or short and the second one only when you are long already.
From what you describe this should fix the issue.

Regards,

ABCTG

Follow me on Twitter Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Increase in trading performance by 75%
The Elite Circle
Exit Strategy
NinjaTrader
Better Renko Gaps
The Elite Circle
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
34 thanks
Tao te Trade: way of the WLD
24 thanks
GFIs1 1 DAX trade per day journal
17 thanks
Vinny E-Mini & Algobox Review TRADE ROOM
13 thanks
My NQ Trading Journal
12 thanks
  #12 (permalink)
jamesfisher
City Poland
 
Posts: 14 since Sep 2012
Thanks Given: 1
Thanks Received: 3

That's true. But the idea is to enter the market only in long direction. E.g. the baseline is that we are flat at the beginning so Marketposition = 0;

The condition to enter market is met so we:
Buy("LEx1") MyContracts contracts Next Bar at maxSetup stop;

Now we have Marketposition = 1.
Market is moving on and again condition is met so we:
Buy("LEx2") MyContracts contracts Next Bar at maxSetup stop;
and Marketposition = 1.

After some time SL is met for first position so we:
Sell("LXx") from entry("LEx1") Next Bar at slLong stop;
and still Marketposition = 1.

Next after some time condition for entering position is met but the system is not able to evaluate if we should use
Buy("LEx1") MyContracts contracts Next Bar at maxSetup stop;
or
Buy("LEx2") MyContracts contracts Next Bar at maxSetup stop;

But my knowledge is no so huge in EL so maybe there is some workaround . Every position will have other SL.



ABCTG View Post
jamesfisher,

you can use the Marketposition reserved word to check that the first entry is only taken when flat or short and the second one only when you are long already.
From what you describe this should fix the issue.

Regards,

ABCTG


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


jamesfisher,

which entry do you want to use in the situation quoted below and why is the system not able to evaluate that?

Regards,

ABCTG


jamesfisher View Post
Next after some time condition for entering position is met but the system is not able to evaluate if we should use
Buy("LEx1") MyContracts contracts Next Bar at maxSetup stop;
or
Buy("LEx2") MyContracts contracts Next Bar at maxSetup stop;


Follow me on Twitter Reply With Quote
  #14 (permalink)
jamesfisher
City Poland
 
Posts: 14 since Sep 2012
Thanks Given: 1
Thanks Received: 3

In this case should be used:
Buy("LEx1") MyContracts contracts Next Bar at maxSetup stop;

because below entry is still in the market:
Buy("LEx2") MyContracts contracts Next Bar at maxSetup stop;



ABCTG View Post
jamesfisher,

which entry do you want to use in the situation quoted below and why is the system not able to evaluate that?

Regards,

ABCTG


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

jamesfisher,

I see. You could use a combination of the market position and the last entry name to check and decide which order to use. However to receive the entry name in a multi leg position you will have to use StrategyHost object. You can find an example in the Tradestation forum here.

Regards,

ABCTG



jamesfisher View Post
In this case should be used:
Buy("LEx1") MyContracts contracts Next Bar at maxSetup stop;

because below entry is still in the market:
Buy("LEx2") MyContracts contracts Next Bar at maxSetup stop;


Follow me on Twitter Reply With Quote
Thanked by:




Last Updated on June 16, 2016


© 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