1. Suppose I have a situation where the market is between a limit buy entry and a limit sell entry and I am happy to take both. If I set up the code like I have shown below, does the TMF evaluate the IF statement on each tick using the previously fixed indicator values? Or do I need to split out the Long and Short trades into separate algos?

My concern is with the double use of the Entry parameter. FYI, the market is always between Indicator1[1] and Indicator2[1]. In the attached screen shot, the red channel is the Indicator and the second bar is the entry bar. As you can see, we can go long and short on the same bar.

In other words, Does Zorro continue evaluating the algo after entry is made in one direction just in case entry can occur in the other direction? I assume the market can dance around a limit order price but we only want to enter at that location once. So does the TMF continue running the algo for entry in the other direction?

var shortentry = Indicator1[1];
var longentry = Indicator2[1];

if(Indicator1[1] < Indicator1[2])
{
Entry = shortentry;
enterShort();
}
else if (Indicator2[1] > Indicator2[2])
{
Entry = longentry;
enterLong();
}

2. Extension question - Understanding Stop and Trail in the TMF - Is Stop set once in the trade even if the algo is assessed at each tick / new bar in the trade?

Is it Trail that is used to move the stop in the direction of the trade? And is it true that the TMF will not move Trail further away even if the algo tries to set a value that is further away?

3. Is it possible to output the initial Stop to the result file or a text file (I believe the later is possible but I have not looked at how.) How?

Is it possible to calculate a trade parameter after the trade has closed and output that to the results file or a text file, e.g. the expectancy of the trade which is the result / stop, i.e. reward to risk ratio for the trade?


These questions seem wordy, but basically I am just clarifying my understanding of the TMF.

Thanks in advance.

Attached Files
Screen1.png (115 downloads)