However, one or two of the Stop layers will need to know the Symbol of the Position as the calculation will be different. For Example, NQ and MNQ I might want to change the stop if the trade is up 50 points but for ES and MES I might want to do the same if up 8 points.
- I know I can just make a Strategy for Each Symbol and just use the appropriate Strategy per chart. (i.e. have 10 strategies - one per symbol)
- I know I can also make Parameter fields that you choose before adding the Strategy to the Chart (one time setup)
BUT I am wondering how to create the Strategy so that it reads the Instrument Position symbol and automatically decides what to do - so that I just create ONE Strategy that works on all the symbols (NQ, MNQ, ES, MES, YM, MYM, RTY, M2K and CL). Trying to make it completely "set it and forget it" rather than 9-10 Strategies with the only difference being the numbers below or the Parameter settings.
Example code:
This would be NQ or MNQ.......I want to replace the "200" and "40" in the code so that for example ES and MES would automatically be 32 ticks and 8 ticks respectively.
// Once NQ or MNQ price is greater than entry price + 200 ticks, set stop loss to 10 points
if (Close[0] > Position.AveragePrice + 200 * TickSize)
{
SetStopLoss(CalculationMode.Price, Position.AveragePrice + 40 * Ticksize);
}
I could not find any posts on this kind of thing.

Comment