Stop , Limit order confirmation order fill

Questions about MultiCharts .NET and user contributed studies.
ural01

Stop , Limit order confirmation order fill

Postby ural01 » 07 May 2018

Hello !!! i try to verify order fill by some cheating counter =0 after profit or stop generated , i,m not sure if i,m correct , i thea normal way to check for last fill order status ?

if (counter < 1)
if(Bars.CurrentBar > 5)
if(StrategyInfo.MarketPosition <= 0)

m_ParabolicSAR.Call();
{
BuySarOrder.Send(m_oparop.Value,Lot);
counter ++;
}

GenerateStopLossPt(PipsStop);
GenerateProfitTargetPt(PipsProfit);
GenerateTrailingStopPt(PipsTraling);
counter =0;

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 141 times

Re: Stop , Limit order confirmation order fill

Postby Anna MultiCharts » 07 May 2018

Hello, ural01!

You can monitor the order state with the help of TradeManager. Please refer to the PowerLanguage .NET Help to find more information about it.

ural01

Re: Stop , Limit order confirmation order fill

Postby ural01 » 07 May 2018

ok i try use from viewtopic.php?f=19&t=46241&p=103087#p103087

but wood you give me example of using Orders_FinishChanging (..., ..) ?
i want to check for order exicuted


TradeManager.ProcessEvents();
}

void Orders_FinishChanging( object sender, EventArgs e )
{
TradeManager.IOrders ord = sender as TradeManager.IOrders;
Output.WriteLine("Data Count = {0}", ord.Items.Length);
foreach (TradeManager.Order o in ord.Items)
{
Output.WriteLine( "Order Profile = {0}, Order ID = {1} , ExecPrice = {2}, Generated = {3}, Filled\\Canceled = {4} ",
o.Profile, o.ID, o.ExecPrice, o.GeneratedDT, o.FinalDT.Value);
}
}

ural01

Re: Stop , Limit order confirmation order fill

Postby ural01 » 07 May 2018

dont return value ?

ural01

Re: Stop , Limit order confirmation order fill

Postby ural01 » 08 May 2018

can i use just StrategyInfo.MarketPosition <0 for sell , StrategyInfo.MarketPosition >0 for buy order ?

User avatar
Anna MultiCharts
Posts: 560
Joined: 14 Jul 2017
Has thanked: 42 times
Been thanked: 141 times

Re: Stop , Limit order confirmation order fill

Postby Anna MultiCharts » 09 May 2018

Ural01,
We slightly adjusted the code in viewtopic.php?f=19&t=46241&p=103087#p103087
Please review it so that you can see the example.
can i use just StrategyInfo.MarketPosition <0 for sell , StrategyInfo.MarketPosition >0 for buy order ?
Yes, you can.


Return to “MultiCharts .NET”