if (Close[0] >= MAX(30)[0])
{
EnterLong("unit1");
EnterLongStop(Close[0] + .5* ATR(20)[0], "unit2");
EnterLongStop(Close[0] + 1.0* ATR(20)[0], "unit3");
EnterLongStop(Close[0] + 1.5* ATR(20)[0], "unit4");
}
What I THINK I am getting is:
system enters unit 1 long and units 2 and 3 on a stop, the price pulls back slightly, and we have to wait for another 30 bar high before the entry of unit 4 because otherwise the MAX30 condition is no longer being met
What I am looking for is:
if the price >= the max price of the last 30 bars
enter unit 1 long and submit orders for units 2, 3, and 4 on a stop based on the ATR
What is the solution here? Thanks for your help!
(image of the above description attached)
A C# Newb
Comment