Topics
Replies
Makagon
16 Jul 2015, 23:53
RE: RE:
Makagon said:
Makagon said:
Hi, if you have position 0.10 lot (for eurusd it's 10000) and want to close half of that, you can use this:
in section OnStart you add:
Positions.Closed += PositionsOnClosed;
in section OnTick you add:
if .... something
and you want to close half of you position use this:
var position = Positions.Find("youLabelPosition");
if (position != null)
ClosePosition(position,5000);
in function
private void PositionsOnClosed(PositionClosedEventArgs args)
{
var position = Positions.Find("youLabelPosition");
if (position != null)
ModifyPosition(position, stopLoss, position.TakeProfit);
}
ModifyPosition(position, stopLoss, NewTakeProfit);
OMG
ModifyPosition(position, NewStopLoss, NewTakeProfit);
@Makagon
Makagon
16 Jul 2015, 23:35
RE:
Makagon said:
Hi, if you have position 0.10 lot (for eurusd it's 10000) and want to close half of that, you can use this:
in section OnStart you add:
Positions.Closed += PositionsOnClosed;
in section OnTick you add:
if .... something
and you want to close half of you position use this:
var position = Positions.Find("youLabelPosition");
if (position != null)
ClosePosition(position,5000);
in function
private void PositionsOnClosed(PositionClosedEventArgs args)
{
var position = Positions.Find("youLabelPosition");
if (position != null)
ModifyPosition(position, stopLoss, position.TakeProfit);
}
ModifyPosition(position, stopLoss, NewTakeProfit);
@Makagon
Makagon
16 Jul 2015, 23:34
Hi, if you have position 0.10 lot (for eurusd it's 10000) and want to close half of that, you can use this:
in section OnStart you add:
Positions.Closed += PositionsOnClosed;
in section OnTick you add:
if .... something
and you want to close half of you position use this:
var position = Positions.Find("youLabelPosition");
if (position != null)
ClosePosition(position,5000);
in function
private void PositionsOnClosed(PositionClosedEventArgs args)
{
var position = Positions.Find("youLabelPosition");
if (position != null)
ModifyPosition(position, stopLoss, position.TakeProfit);
}
@Makagon
Makagon
13 Jul 2015, 23:25
Ok, it's easy, use this:
var eurusd = MarketData.GetSeries("EURUSD", TimeFrame.Daily);
var usdjpy = MarketData.GetSeries("USDJPY", TimeFrame.Daily);
var gbpusd= MarketData.GetSeries("GBPUSD", TimeFrame.Daily);
next...
(eurusd.Close(LastResult)+usdjpy .Close(LastResult))/gbpusd.Close(LastResult)
@Makagon
Makagon
16 Jul 2015, 23:57
give all code, i send where is error.
@Makagon