I'm a newbie and tried writing a very simple strategy. I am able to successfully write and execute a new strategy using the wizard. However, as soon as try to re-run the script with a new set of parameters, it executes with the original settings I used the first time! Why is that?
Also, I can't seem to get the BarsSinceEntry function to trigger a new purchase. Here are the two conditions I setup using the script wizard:
protected override void OnBarUpdate()
{
// Condition set 1
if (BarsSinceEntry() == BuyPeriod)
{
EnterLong(DefaultQuantity, "");
}
// Condition set 2
if (BuyAtStart == true
&& Variable0 != 37)
{
EnterLong(DefaultQuantity, "");
Variable0 = 37;
}
Any help would be greatly appreciated!
Thanks,
Frustrated New User

Comment