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;
Stop , Limit order confirmation order fill
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 141 times
Re: Stop , Limit order confirmation order fill
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.
You can monitor the order state with the help of TradeManager. Please refer to the PowerLanguage .NET Help to find more information about it.
Re: Stop , Limit order confirmation order fill
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);
}
}
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);
}
}
Re: Stop , Limit order confirmation order fill
can i use just StrategyInfo.MarketPosition <0 for sell , StrategyInfo.MarketPosition >0 for buy order ?
- Anna MultiCharts
- Posts: 560
- Joined: 14 Jul 2017
- Has thanked: 42 times
- Been thanked: 141 times
Re: Stop , Limit order confirmation order fill
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.
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.
Yes, you can.can i use just StrategyInfo.MarketPosition <0 for sell , StrategyInfo.MarketPosition >0 for buy order ?