Any guidance and advise would be helpful as I have not found this problem posted earlier on this forum - and I sincerely hope its not something on my NT8 instance alone!
{
...
...
...
region LONG POSITION MANAGEMENT
// ENTER LONG
if ( << ENTRY CONDITIONS MET >>)
{
//============= NOT WORKING IN REALTIME. BRACKETS ARE STILL ENTERED ON STRAEGY CLCULATION INTERVAL (BAR CLOSE OR PRICE CHANGE)
{
ExitLongStopMarket(Convert.ToInt32(Order_Qty), ATRStop);
ExitLongLimit(Position.AveragePrice + PreferredPositionTarget);
}
// Trailing Stop & Target Profit for LONG POSITION
if ((Position.MarketPosition == MarketPosition.Long)
&& (TradeCheck == true))
{
...
ExitLongStopMarket(Convert.ToInt32(Order_Qty), ATRStop); // Enter a stop-loss order (stop market)
ExitLongLimit(Position.AveragePrice + PreferredPositionTarget); // Enter a target order (limit order)
TradeCheck = false; // Disable the flag so this piece of logic is not executed till position is exited
...
...
...
...
if ((Position.MarketPosition == MarketPosition.Long)
&& (TradeCheck == false))
{
ExitLongLimit(Position.AveragePrice + PreferredPositionTarget); // Enter a target order (limit order)
...
...
...
#endregion

Comment