How can I do this:
if the price it´s in the channel determinate by Swing Indicator, and I would like send a BuyStop order at Swing High and a SellStop Order at Swing Low simultaneously.
I've trying this:
picosuperior = Swing(NBarras).SwingHigh[0];
picoinferior = Swing(NBarras).SwingLow[0];
if((Position.MarketPosition == MarketPosition.Flat)
{
EnterLongStop(picosuperior);
EnterShortStop(picoinferior;
}
In this case only BuyStop Orders are sents
I've trying set a two differents conditions for buy or sell as:
if((picosuperior-Close[0])<(Close[0]-picoinferior))
{
EnterLongStop(picosuperior);
}
if ((picosuperior-Close[0])>(Close[0]-picoinferior))
{
EnterShortStop(picoinferior);
}
But don't work properly because in example if the actuall barr send a sell stop order and in the next barr the market reverse quickly and SwingHigh is surpassed, not enough time to modify order and can't enter in long position.
Can you hep me?
Thank you in advance.
Luis Olivares
Pd. Excuse me for my english

Comment