Remove equal position sizing from RSI divergence strategy
This commit is contained in:
parent
0d2dd3509a
commit
5562b05589
@ -1,7 +1,6 @@
|
|||||||
#region Using declarations
|
#region Using declarations
|
||||||
using NinjaTrader.Cbi;
|
using NinjaTrader.Cbi;
|
||||||
using NinjaTrader.NinjaScript.Indicators;
|
using NinjaTrader.NinjaScript.Indicators;
|
||||||
using System;
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
namespace NinjaTrader.NinjaScript.Strategies
|
namespace NinjaTrader.NinjaScript.Strategies
|
||||||
@ -45,10 +44,7 @@ namespace NinjaTrader.NinjaScript.Strategies
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if (rsi[0] > rsi[5] && Close[0] < Close[5])
|
if (rsi[0] > rsi[5] && Close[0] < Close[5])
|
||||||
{
|
EnterLong();
|
||||||
int quantity = (int)Math.Floor(100000 / Close[0]);
|
|
||||||
EnterLong(quantity);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Position.MarketPosition == MarketPosition.Long && rsi[0] > 70.0)
|
if (Position.MarketPosition == MarketPosition.Long && rsi[0] > 70.0)
|
||||||
ExitLong();
|
ExitLong();
|
||||||
|
Loading…
Reference in New Issue
Block a user