Anyway to see what the name of the last exit was or if a limit was hit? - EasyLanguage Programming | futures io social day trading
futures io futures trading


Anyway to see what the name of the last exit was or if a limit was hit?
Updated: Views / Replies:1,589 / 8
Created: by sourbrew Attachments:0

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors – all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you don’t need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 
Thread Tools Search this Thread
 

Anyway to see what the name of the last exit was or if a limit was hit?

  #1 (permalink)
Trading Apprentice
97214
 
Futures Experience: Intermediate
Platform: multicharts, TradeStation
Favorite Futures: us
 
Posts: 4 since Mar 2011
Thanks: 0 given, 0 received

Anyway to see what the name of the last exit was or if a limit was hit?

Hey everyone, longtime lurker first time poster.

First just want to say this site is an incredible resource and probably the best easylanguage source on the internet.

Secondly I was wondering if there is anyway to programitcally know what the name of the last exit order was, or if that isn't possible to instead know if a stop limit was hit on the previous bar.

I can think of some clunky programming tactics like looking to see if my limit price was crossed, but my strategy is pretty complicated and it might have exited for other reasons than the limit.

Thanks in advance.

Edit: Suppose I should also ask if anyone has a good reference for the new libraries in tradestation 9. It would appear that the c# wrapper has a lot more functionality, but I haven't seen any basic tutorials anywhere.


Last edited by sourbrew; September 9th, 2011 at 10:37 PM.
Reply With Quote
 
  #2 (permalink)
Quick Summary
Quick Summary Post

Quick Summary is created and edited by users like you... Add FAQ's, Links and other Relevant Information by clicking the edit button in the lower right hand corner of this message.

 
  #3 (permalink)
Elite Member
Paris, France
 
Futures Experience: Advanced
Platform: Amibroker
Favorite Futures: Futures, Stocks
 
Posts: 96 since Jun 2011
Thanks: 118 given, 102 received


You can use the function exitname(position ago), for example:

 
Code
if exitname(1)="Long Exit" then sellshort ("Long Reversal") next bar at market;

Reply With Quote
 
  #4 (permalink)
Trading Apprentice
97214
 
Futures Experience: Intermediate
Platform: multicharts, TradeStation
Favorite Futures: us
 
Posts: 4 since Mar 2011
Thanks: 0 given, 0 received

Exitname function

Is this in multicharts only? Doesn't appear in my tradestation dictionary and throws an error on execution.

Reply With Quote
 
  #5 (permalink)
Elite Member
Paris, France
 
Futures Experience: Advanced
Platform: Amibroker
Favorite Futures: Futures, Stocks
 
Posts: 96 since Jun 2011
Thanks: 118 given, 102 received


sourbrew View Post
Is this in multicharts only? Doesn't appear in my tradestation dictionary and throws an error on execution.

Could be, I only use MC.

Reply With Quote
 
  #6 (permalink)
Trading Apprentice
97214
 
Futures Experience: Intermediate
Platform: multicharts, TradeStation
Favorite Futures: us
 
Posts: 4 since Mar 2011
Thanks: 0 given, 0 received

Thanks, although this presents additional problems as it appears multicharts does not support commentarycl or the analysis commentary window.

Anyone know of a good way to get debug info out of a signal in multicharts?

Thanks

Reply With Quote
 
  #7 (permalink)
 Vendor: tradingcode.net 
The Netherlands
 
Futures Experience: None
Platform: MultiCharts, TradingView
Favorite Futures: ...
 
Jura's Avatar
 
Posts: 774 since Apr 2010
Thanks: 2,347 given, 661 received


sourbrew View Post
Thanks, although this presents additional problems as it appears multicharts does not support commentarycl or the analysis commentary window.

Why overcomplicate things? Perhaps the code below can work as an alternative if ExitName() and EntryName() are not available:
 
Code
                            
variablesmaFast(0), maSlow(0), longCondition(False), shortCondition(False), theEntryName(""), theExitName("");

// Enter Long
if maFast crosses over maSlow and longCondition true then begin
    theEntryName 
"Enter Long1";
    
buy("EL"1000 contracts next bar at market;
end;

    
// Exit Long
if maFast crosses under maSlow then begin
    theExitName 
"Exit Long1";
    
Sell("XL"next bar at market;
end;

// Enter Short
if maFast crosses under maSlow and shortCondition true then begin
    theEntryName 
"myShort 1";
    
SellShort("ES"1000 contracts next bar at market;
end;

    
// Exit Short
if maFast crosses over maSlow then begin
    theExitName 
"ExitShort1";
    
BuyToCover("XS"next bar at market;
end;

if 
theEntryName "Enter Long1" then begin

    
// do something

end else if theEntryName "myShort 1" then begin

    
// do something else

end

Quoting 
Anyone know of a good way to get debug info out of a signal in multicharts?

Use Print() to print the data to the output window of the PowerLanguage Editor, or use FileAppend() to write to an external text file.

Regards,

Reply With Quote
The following user says Thank You to Jura for this post:
 
  #8 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,354 given, 83,235 received

Check out the new reserve words proposed for MultiCharts 7.1. They've added some stuff specifically to make this easier:


Quoting 

New PowerLanguage keywords
September 15, 2011


1. PosTradeCount

Returns a numerical value, indicating the total number of entries for the specified position.
Usage
PosTradeCount (PosBack)
Where: PosBack - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.

Notes
This function can only be used in signals.
Example
PosTradeCount (1) will return a value of 2 if there were two separate entries for the most recently closed position

2. PosTradeSize

Returns an absolute numerical value, indicating the number of contracts or shares in the specified trade.

Usage
PosTradeSize(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount .

Notes
This function can only be used in signals.
Example
PosTradeSize(0,1) will return a value of 2 for the second trade of the open position, if this trade had a quantity of 2.

3. PosTradeCommission

Returns an absolute numerical value, indicating the commission amount spent for the specified trade.

Usage
PosTradeCommission(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeCommission(0,1) will return a value of 5 for the second trade of the open position, if the commission for this trade is 5 dollars.


4. PosTradeProfit

Returns an absolute numerical value, indicating the profit (or loss if negative) of the specified trade.

Usage
PosTradeProfit(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount
Notes
This function can only be used in signals.
Example
PosTradeProfit(0,1) will return a value of 3 for the second trade of the open position, if the profit for this trade is 3 dollars.

5. PosTradeEntryName

Returns entry order name. Entry Name is indicated on the chart and in Order and Position Tracker Window

Usage
PosTradeEntryName(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeEntryName(0,1) will return a value of “buy LE” for the second trade of the open position, if this trade was opened by the order with “buy LE” name.

6. PosTradeEntryPrice

Returns an absolute numerical value, indicating the execution price of trade entry order.

Usage
PosTradeEntryPrice(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeEntryPrice(0,1) will return a value of 100.2 for the second trade of the open position, if this trade was opened by the order filled at 100.2

7. PosTradeEntryBar

Returns an absolute numerical value, indicating bar number of the trade entry order.

Usage
PosTradeEntryBar(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeEntryBar(0,1) will return a value of 25 for the second trade of the open position, if this trade was opened on 25th bar.

8. PosTradeEntryCategory

Returns an absolute numerical value, indicating trade entry order category. The following types are possible:

1 = Stop order (buy next bar at close - 1 point stop)
2 = Limit order (buy next bar at close + 1 point limit)
3 = Market order (buy next bar market)
4 = Market at Close order (buy this bar at close)
5 = Market at open order (buy next bar open)
8 = StopLimit order (buy 1 contracts next bar at close - 2 point stop close + 2 point limit)

Usage
PosTradeEntryCateory(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeEntryCategory(0,1) will return a value of 1 for the second trade of the open position, if the order type was Stop Order



9. PosTradeExitName

Returns exit order name. Exit Name is indicated on the chart and in Order and Position Tracker Window

Usage
PosTradeExitName(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeExitName(0,1) will return a value of “sell LX” for the second trade of the open position, if this trade was closed by the order with “sell LX” name.

10. PosTradeExitPrice

Returns an absolute numerical value, indicating the execution price of trade exit order.

Usage
PosTradeExitPrice(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeExitPrice(0,1) will return a value of 100.5 for the second trade of the open position, if this trade was closed by the order filled at 100.5.

11. PosTradeExitBar

Returns an absolute numerical value, indicating bar number of the trade exit order.

Usage
PosTradeExitBar(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeExitBar(0,1) will return a value of 28 for the second trade of the open position, if this trade was closed on 28th bar.

12. PosTradeExitCategory

Returns an absolute numerical value, indicating trade exit order category. The following types are possible:

1 = Stop order (buy next bar at close - 1 point stop)
2 = Limit order (buy next bar at close + 1 point limit)
3 = Market order (buy next bar market)
4 = Market at Close order (buy this bar at close)
5 = Market at open order (buy next bar open)
8 = StopLimit order (buy 1 contracts next bar at close - 2 point stop close + 2 point limit)

Usage
PosTradeExitCateory(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount
Notes
This function can only be used in signals.
Example
PosTradeExitCategory(0,1) will return a value of 3 for the second trade of the open position, if the closing order type was Market Order.

13. PosTradeIsOpen

Returns True value if the trade is open, False value if the trade is closed. It makes sense to check the trades of the open position. For other positions False is always returned.

Usage
PosTradeIsOpen(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeIsOpen(0,1) will return True for the second trade of the open position, if this trade is opened (haven’t close order).


14. PosTradeIsLong

Returns True value if the trade was opened by buy order, otherwise False value is returned.

Usage
PosTradeIsLong(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.
Example
PosTradeIsLong(0,1) will return True for the second trade of the open position, if this trade was opened by “buy” order.

15. PosTradeEntryDateTime

Returns double-precision decimal DateTime for entry order. As an example see computerdatetime .

Usage
PosTradeEntryDateTime(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.

16. PosTradeExitDateTime

Returns double-precision decimal DateTime for exit order. As an example see computerdatetime .

Usage
PosTradeExitDateTime(PosAgo, TradeNumber)
Where: PosAgo - a numerical expression, specifying the position:
0 - open position;
1 - one position back (the last position closed);
2 - two positions back, etc.
TradeNumber - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in specified position use PosTradeCount

Notes
This function can only be used in signals.



17. Portfolio_InvestedCapital

Returns absolute value in US dollars, indicating the amount of cash assets invested in portfolio securities on the moment of strategy calculation.

18. Entryname

Returns the name of the order which opened the position.

Usage

EntryName(TradeNumber)
Where: TradeNumber - a numerical expression, specifying the number of trade (zero-based).

Notes

Same as PosTradeEntryName(0, TradeNumber).

19. Exitname

Returns the name of the order which closed the position.

Usage

ExitName(TradeNumber)
Where: TradeNumber - a numerical expression, specifying the number of trade (zero-based).

Notes

Same as PosTradeExitName(0, TradeNumber).

20. AvgEntryPrice_at_Broker_for_The_Strategy

Returns a numerical value, indicating the average entry price at the broker for the strategy.
A positive value indicates a long position and a negative value indicates a short position. A zero ('0') is returned when the current position is flat, or if Automated Trading is not turned on.

Usage

AvgEntryPrice_at_Broker_for_The_Strategy

Notes

This function can only be used in signals and functions.

Important

If Automated Trading was manually turned off by the user, the value returned by the keyword stops changing, and may remain unequal to '0'.

21. AvgEntryPrice_at_Broker

Returns a numerical value, indicating the average entry price at the broker for the symbol.
A positive value indicates a long position and a negative value indicates a short position.
A zero ('0') is returned when the current position is flat, or if Automated Trading is not turned on.

Usage

AvgEntryPrice_at_Broker

Notes

This function can only be used in signals and functions.
This function can only be used with Interactive Brokers, Patsystems, and Zen-Fire.

Important

If Automated Trading was manually turned off by the user, the value returned by the keyword stops changing, and may remain unequal to '0'

22. q_time_s

Same as q_time. Time is indicated in HHmmss format.

23. ClearPrintLog

Same as cleardebug.

24. mc_tl_getactive

Returns a numerical value indicating the trendline ID number of the currently selected trendline; returns a value of -1 if no trendlines are currently selected.

Usage

Mc_tl_GetActive


Notes

A trendline-specific ID number is assigned by mc_tl_New when the trendline is created.

Example

Assign a value, indicating the trendline ID number of the currently selected trendline, to Value1 variable:
Value1=mc_TL_GetActive;

25. tl_getactive

This reserved word returns a numeric value representing the ID of the currently active trendline..

Value1 = TL_GetActive();

Value1 is any numeric variable or array. You must assign the trendline reserved word to a numeric variable or array so that you can determine whether or not the reserved word performed its operation successfully.

Remarks

When the reserved word performs its operation successfully, a 0 is returned. When a reserved word cannot perform its operation, it returns an error code.

26. mc_arw_getactive

Returns a numerical value indicating the arrow ID number of the currently selected arrow; returns a value of -1 if no arrows are currently selected.

Usage

Mc_arw_GetActive

Example

Assign a value, indicating the arrow ID number of the currently selected arrow, to Value1 variable:
Value1=mc_arw_GetActive;

27. mc_text_getactive

Returns a numerical value indicating the text ID number of the currently selected text; returns a value of -1 if no text is currently selected.

Usage

Mc_text_GetActive

Example

Assign a value, indicating the text ID number of the currently selected text, to Value1 variable:
Value1=mc_text_GetActive;

28. Boxsize

Returns the price-based interval setting associated with the specified price-based chart type an indicator or signal is applied to.
This value is set in the Chart Type section of the Settings tab within the Format Instrument dialog for a chart.


Chart Type Value Returned
Point & Figure Box Size value
Point Point value
Renko Box Size value

29. Revsize

Returns the Reversal of a Point & Figure chart, the Reversalof a Kagi chart, or the number of Line Breaks in a Line Break chart. This value is set in the Chart Type section of the Settings tab within the Format Instrument dialog for a chart.
Example
RevSize returns 2 if the reversal size of a P & F chart is set to 2.
RevSize returns 5 if the number of line breaks for a Line Break chart is set to 5.
RevSize returns 4 if the reversal size of a Kagi chart is set to 4%.


30. RecalcLastBarAfter

Initializes the calculation after expiration of the timeout, set in seconds

Usage

RecalcLastBarAfter(timeout)
Where timeout indicates the number of seconds.

Notes

RecalcLastBarAfter is used for the slow markets. Calculation of the studies is performed in events when the immediate tick has come to a chart. When the tick has not come since the moment of the last calculation and during timeout (sec) a new calculation is being initialized. When the tick has been received before timeout expiration, time counter is reset and countdown for RecalcLastBarAfter(timeout) starts anew

31. i_AvgEntryPrice_at_Broker

Returns the Average entry price of each open entry in a pyramided position.
Notes
I_AvgEntryPrice only returns the average entry price for open trades.
I_AvgEntryPrice can only be used in an indicator.
I_AvgEntryPrice will only return a value if a signal is applied to the same data.

Example
I_AvgEntryPrice returns 170 if three trades are currently open and were entered at a price of 140, 170, and 200.
I_AvgEntryPrice returns 53 if four trades are currently open and were entered at a price of 54, 48, 60, and 50.



32. i_AvgEntryPrice_at_Broker_for_The_Strategy

Is used for the extraction of strategy information in indicator. Returns the same information as AvgEntryPrice_at_Broker_for_The_Strategy.

33. PlaceMarketOrder

Places market order at the broker without position changing on the chart

Usage
PlaceMarketOrder(IsBuy, IsEntry, Contracts)

Where:

IsBuy indicates whether order is buy or sell,
IsEntry indicates whether order is entry or exit,
Contracts indicates the number of contracts/shares of the order.


Notes

Works with auto trading turned off. Can be used as a mean of synchronization of strategy market position with a broker

34. ChangeMarketPosition

Places the order with set name and price on the chart. Though when auto trading is off the order will not be sent to a broker.

Usage

ChangeMarketPosition(Delta, Price, Name)

Where
Delta – number of contracts by which current market position should be changed.
Price – order filling price.
Name – name of the order that changes the position.

Notes

Can be used as a mean of synchronization of strategy market position with a broker

Example

If marketposition = 2 then ChangeMarketPosition(-2, 100, “LX”)
Will place close order with the name “LX” and the price 100 if current marketposition =2

If marketposition = 0 then ChangeMarketPosition(-2, 100, “SE”)
Will place open order with the name “SE” and the price 100 if current marketposition =0

35. OpenEntriesCount

Same as CurrentEntries.

36. OpenEntryDate

Returns a numerical value, indicating the date of specified entry into the open position. The date is indicated in the YYYMMdd format, where YYY is the number of years since 1900, MM is the month, and dd is the day of the month.

Usage

OpenEntryDate(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount


Notes

This function can only be used in signals.

Example

OpenEntryDate(1) will return 1110402 for the open position if the second trade was generated at April 2nd, 2011.

37. OpenEntryTime

Returns a numerical value, indicating the time of specified entry into the open position. The time is indicated in the HHmm format, where HH is the hour in 24 hours format and mm are minutes.

Usage

OpenEntryTime(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount


Notes

This function can only be used in signals.



38. OpenEntryPrice

Returns a numerical value, indicating the price of specified entry into the open position.

Usage

OpenEntryPrice(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount

Notes
This function can only be used in signals.

39. OpenEntryContracts

Returns a numerical value, indicating the Quantity of contracts of specified entry order into the open position.

Usage
OpenEntryContracts(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount

Notes
This function can only be used in signals.


40. OpenEntryProfit
Returns a numerical value, indicating the profit (loss if negative) of specified entry into the open position in dollars.

Usage
OpenEntryProfit(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount

Notes
This function can only be used in signals.


41. OpenEntryMaxProfit

Returns a numerical value, indicating maximal value of OpenEntryProfit for the time from entry order execution

Usage
OpenEntryMaxProfut(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount
Notes
This function can only be used in signals.


42. OpenEntryMinProfit


Returns a numerical value, indicating minimal value of OpenEntryProfit for the time from entry order execution

Usage
OpenEntryMinProfut(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount
Notes
This function can only be used in signals.

43. OpenEntryProfitPerContract

Returns a numerical value, indicating the profit (loss if negative) per contract of specified entry in dollars.

Usage
OpenEntryProfitPerContract(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount
Notes
This function can only be used in signals.

.
44. OpenEntryMaxProfitPerContract

Returns a numerical value, indicating maximal value of OpenEntryProfitPerContract for the time from entry order execution

Usage
OpenEntryMaxProfitPerContract(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount
Notes
This function can only be used in signals.

45. OpenEntryMinProfitPerContract

Returns a numerical value, indicating minimal value of OpenEntryProfitPerContract for the time from entry order execution

Usage
OpenEntryMinProfitPerContract(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount

Notes
This function can only be used in signals.







46. OpenEntryComission
Returns a numerical value, indicating the amount of cash assets in US dollars spent on the commission for specified trade.

Usage
OpenEntryComission(EntryIndex)
Where: EntryIndex - a numerical expression, specifying the number of trade (zero-based). To retrieve the total number of trades in open position use OpenEntriesCount

Notes
This function can only be used in signals.
47. Not


Used in TrueFalse statements – negative

Example
condition1 = true;
condition2 = not condition1;
Assigns to condition2 value opposite to condition1.





Other changes

i_openequity –
Returns the current equity = netprofit + openpositionprofit
Usage
i_OpenEquity
Notes
This function can only be used in studies.
Example
i_OpenEquity will return 100 if the current equity is 100.
i_OpenEquity will return -100 if the current equity is -100.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
 
  #9 (permalink)
Trading Apprentice
97214
 
Futures Experience: Intermediate
Platform: multicharts, TradeStation
Favorite Futures: us
 
Posts: 4 since Mar 2011
Thanks: 0 given, 0 received


Jura View Post
Use Print() to print the data to the output window of the PowerLanguage Editor, or use FileAppend() to write to an external text file.

Thanks for the bit about multicharts, the first part does not actually apply though because the strategies are being exited via a limit order being crossed, not by a ma crossing.

@BigMike,

Thanks some of these look great, multicharts is clearly becoming a superior platform at least where EasyLanguage is concerned.

Reply With Quote

Reply



futures io > > > > > Anyway to see what the name of the last exit was or if a limit was hit?

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
Strategy Entry/Exit Visualization zeller4 NinjaTrader Programming 6 November 8th, 2012 11:22 AM
a simple entry exit bar johni EasyLanguage Programming 7 July 23rd, 2011 05:34 AM
Best Price Enter/Exit? NJAMC Elite Automated NinjaTrader Trading 3 July 8th, 2011 06:00 PM
Exit using CCI Indicator kian123 NinjaTrader Programming 4 November 17th, 2010 09:23 AM
Timed exit in auto strategy nanobiotech NinjaTrader Programming 2 December 28th, 2009 08:57 PM


All times are GMT -4. The time now is 09:22 AM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
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.
no new posts
Page generated 2017-12-16 in 0.31 seconds with 19 queries on phoenix via your IP 54.83.122.227