I use a unique way to ramdommize my entries and now i wish to scalp with it . I take the crypto service provider from C# .
My ninjascript NT7 is fine but i have problems with overfills . For example :
//__________________________________________________ __________________________________________________ _______________________________
// __________________________________________________ __________________________________________________ ______________________________
// Cryptographic Random Number Generator (CRNG)
byte[] random = new Byte[1];
RNGCryptoServiceProvider rng = new RNGCryptoServiceProvider();
rng.GetBytes(random); // The array is now filled with cryptographically strong random bytes.
//__________________________________________________ __________________
// Condition set 1
if (Position.MarketPosition == MarketPosition.Flat
&& (random[0] < 127) && (BarsSinceExit() > 7 || BarsSinceExit() == -1))
{
EnterLong(C, "Alt Norte !");
}
// Condition set 2
if (Position.MarketPosition == MarketPosition.Flat
&& (random[0] >= 127) && (BarsSinceExit() > 7 || BarsSinceExit() == -1))
{
EnterShort(C, "Baix Norte !");
}
This piece of code could be changed so overfill would be fixed ?
Comment