.SendFromEntry()  [SOLVED]

Questions about MultiCharts .NET and user contributed studies.
BD.
Posts: 19
Joined: 02 Feb 2024
Has thanked: 2 times
Been thanked: 2 times

.SendFromEntry()

Postby BD. » 02 Mar 2024

Can't find any information about SendFromEntry. Is it the same as "exit from"? How can I use it? Thanks

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 55 times

Re: .SendFromEntry()  [SOLVED]

Postby Polly MultiCharts » 06 Mar 2024

Hello BD.,

IOrderPriced.SendFromEntry Method allows the generation of Price exit from entry order with 'price' price and 'num_lots' number of contracts.
For more info please see Help Content in PowerLanguage Editor → Help → PowerLanguage Editor .NET Help → PowerLanguage → IOrderPriced Interface → Methods → SendFromEntry Method.
Image
Here is the usage sample you can refer to:

Code: Select all

using System; using System.Drawing; using System.Linq; using PowerLanguage.Function; using ATCenterProxy.interop; namespace PowerLanguage.Strategy { public class test : SignalObject { public test(object _ctx):base(_ctx){} private IOrderMarket buy_order; private IOrderPriced sell_FromEntry; protected override void Create() { // create variable objects, function objects, order objects etc. buy_order = OrderCreator.MarketNextBar(new SOrderParameters(Contracts.Default, "Buy", EOrderAction.Buy)); sell_FromEntry = OrderCreator.Stop(new SOrderParameters(Contracts.Default, "Sell", EOrderAction.Sell, OrderExit.FromEntry())); } protected override void StartCalc() { // assign inputs } protected override void CalcBar(){ // strategy logic buy_order.Send() ; sell_FromEntry.SendFromEntry(Bars.Close[0]-20*Bars.Point,"Buy"); } } }

andrei
Posts: 30
Joined: 24 Jan 2013
Has thanked: 3 times
Been thanked: 4 times

Re: .SendFromEntry()

Postby andrei » 05 Apr 2024

Hi @Polly,

Would be lovely if you pinged answers to the following:

- OrderExit is a class having info on the exit type. Among other things, it has following members:
1) EExitType
2) FromAll
3) FromEntry
4) FromEntryTotal
5) Total
Yet, the above are not properly defined, or exemplified in terms of usage nowhere.

- EExitType is an Enumeration w/ following properties:
1) All
2) FromOne
3) FromOneTotal
4) Total
5) GetName
6) GetNames
7) GetValues
8) Parse
9) .......

Other questions:
10) How does placing or not placing a "name" into a "Contracts.Specified" type of SORderParameters defined order, impacting a scale-in / scale-out trade execution.
11) What are the complete list of rules of engagement between various order types acting on the same instrument on a timeline ...
12) How do you control Strategy Property -> Position Limits from code
13) How do you allow just the initiating order to scale-in / add to its position?

Yet, these are NOT properly defined anywhere, nor exemplified how to be used.

- Your own example above: { sell_FromEntry.SendFromEntry(Bars.Close[0]-20*Bars.Point,"Buy"); }. makes no sense. Every bar will have a send entry order and a limit order - not clear to exemplify this order type, you basically send 2 orders every bar - it is not realistic. A more realistic would be - say, you send the entry on bar 100, and the limit exit on bar 200. What is the expected outcome?

- Are there any examples on adding 2 times to a position and then removing 2 times from a position, to its total liquidation, and how do you preserve a position "identity" in code ...

- How do you scale in multiple times, and then scale out multiple times from a position, within a strategy, without messing about with Strategy's "Allow up to 10 entry orders ..." setting (leaving this to disabled)?
Last edited by andrei on 06 Apr 2024, edited 2 times in total.

BD.
Posts: 19
Joined: 02 Feb 2024
Has thanked: 2 times
Been thanked: 2 times

Re: .SendFromEntry()

Postby BD. » 06 Apr 2024

Hi @Polly,

Would be lovely if you pinged answers to the following:

- OrderExit is a class having info on the exit type. Among other things, it has following members:
1) EExitType
2) FromAll
3) FromEntry
4) FromEntryTotal
5) Total
Yet, the above are not properly defined, or exemplified in terms of usage nowhere.

- EExitType is an Enumeration w/ following properties:
1) All
2) FromOne
3) FromOneTotal
4) Total
5) GetName
6) GetNames
7) GetValues
8) Parse
9) .......
Yet, these are NOT properly defined anywhere, nor exemplified how to be used.

- Your own example above: { sell_FromEntry.SendFromEntry(Bars.Close[0]-20*Bars.Point,"Buy"); }. makes no sense. Every bar will have a send entry order and a limit order - not clear to exemplify this order type. Say, you send the entry on bar 100, and the limit exit on bar 200. What is the expected outcome?

- Are there any examples on adding 2 times to a position and then removing 2 times from a position, to its total liquidation, and how do you preserve a position "identity" in code ...

- How do you scale in multiple times, and then scale out multiple times from a position, within a strategy, without messing about with Strategy's "Allow up to 10 entry orders ..." setting (leaving this to disabled)?
Well, I just wanted the syntax, so that example is good enough. But it would definitely be nice to see a well structured guide with some examples to help new coders like myself to learn how to use mc.net. I doubt we will see it any time soon thou, just have to try and see.

andrei
Posts: 30
Joined: 24 Jan 2013
Has thanked: 3 times
Been thanked: 4 times

Re: .SendFromEntry()

Postby andrei » 06 Apr 2024

Hi @Polly,

Would be lovely if you pinged answers to the following:

- OrderExit is a class having info on the exit type. Among other things, it has following members:
1) EExitType
2) FromAll
3) FromEntry
4) FromEntryTotal
5) Total
Yet, the above are not properly defined, or exemplified in terms of usage nowhere.

- EExitType is an Enumeration w/ following properties:
1) All
2) FromOne
3) FromOneTotal
4) Total
5) GetName
6) GetNames
7) GetValues
8) Parse
9) .......
Yet, these are NOT properly defined anywhere, nor exemplified how to be used.

- Your own example above: { sell_FromEntry.SendFromEntry(Bars.Close[0]-20*Bars.Point,"Buy"); }. makes no sense. Every bar will have a send entry order and a limit order - not clear to exemplify this order type. Say, you send the entry on bar 100, and the limit exit on bar 200. What is the expected outcome?

- Are there any examples on adding 2 times to a position and then removing 2 times from a position, to its total liquidation, and how do you preserve a position "identity" in code ...

- How do you scale in multiple times, and then scale out multiple times from a position, within a strategy, without messing about with Strategy's "Allow up to 10 entry orders ..." setting (leaving this to disabled)?
Well, I just wanted the syntax, so that example is good enough. But it would definitely be nice to see a well structured guide with some examples to help new coders like myself to learn how to use mc.net. I doubt we will see it any time soon thou, just have to try and see.
Yeah ... but then there's others catching up big time in this space ... so you stay idle, you become idle. the other killer is being limited to .NET Framework 4.0 - let's not go there :)

BD.
Posts: 19
Joined: 02 Feb 2024
Has thanked: 2 times
Been thanked: 2 times

Re: .SendFromEntry()

Postby BD. » 06 Apr 2024

Hi @Polly,

Would be lovely if you pinged answers to the following:

- OrderExit is a class having info on the exit type. Among other things, it has following members:
1) EExitType
2) FromAll
3) FromEntry
4) FromEntryTotal
5) Total
Yet, the above are not properly defined, or exemplified in terms of usage nowhere.

- EExitType is an Enumeration w/ following properties:
1) All
2) FromOne
3) FromOneTotal
4) Total
5) GetName
6) GetNames
7) GetValues
8) Parse
9) .......
Yet, these are NOT properly defined anywhere, nor exemplified how to be used.

- Your own example above: { sell_FromEntry.SendFromEntry(Bars.Close[0]-20*Bars.Point,"Buy"); }. makes no sense. Every bar will have a send entry order and a limit order - not clear to exemplify this order type. Say, you send the entry on bar 100, and the limit exit on bar 200. What is the expected outcome?

- Are there any examples on adding 2 times to a position and then removing 2 times from a position, to its total liquidation, and how do you preserve a position "identity" in code ...

- How do you scale in multiple times, and then scale out multiple times from a position, within a strategy, without messing about with Strategy's "Allow up to 10 entry orders ..." setting (leaving this to disabled)?
Well, I just wanted the syntax, so that example is good enough. But it would definitely be nice to see a well structured guide with some examples to help new coders like myself to learn how to use mc.net. I doubt we will see it any time soon thou, just have to try and see.
Yeah ... but then there's others catching up big time in this space ... so you stay idle, you become idle. the other killer is being limited to .NET Framework 4.0 - let's not go there :)
It's true. hope they are aware and have a plan.

User avatar
Polly MultiCharts
Posts: 203
Joined: 20 Jul 2022
Has thanked: 1 time
Been thanked: 55 times

Re: .SendFromEntry()

Postby Polly MultiCharts » 12 Apr 2024

Dear users,

Indicators and signals for MultiCharts .NET can be written using C# and VB.NET programming languages. The following information requires that the reader has basic knowledge of any C# or VB.NET programming languages. For more detailed info you can check the following reference.
The script execution logic is described in the EasyLanguage guides from TS. Here are some additional resources.
The names of the methods in our implementation, if possible, repeat the keywords from PowerLanguage.

As for new .NET Framework versions support, our developers are evaluating it, there's no ETA yet.


Return to “MultiCharts .NET”