I want to keep the initial stop 1 point lower than MIN2 = MIN(Low, 10) by saving the value on entrybar (bold text in the code). Unfortunately I get an error code in playback mode that tells me orders can't be placed above market and ninja immediately sells my long position. Can someone kindly help me in getting the correct code for this? Without saving the variable it actually works, but then of course the Stop is moving each 10 bars. I want to have it fixed. Thanks in advance!
// Entry & Initial Stop if ((SMA1[1] > EMA1[1]) { EnterLongStopMarket(Convert.ToInt32(DefaultQuantit y), (High[1] + 1) , @"Long Einstieg"); [B]entrybar = MIN2[CurrentBar];[/B] } ExitLongStopMarket(Convert.ToInt32(DefaultQuantity ), ([B]entrybar - 1[/B]) , @"Initial Stop", @"Long Einstieg");
private double entrybar;
Comment