Topic: Different strategies for long and short positions

I am trying to build a basic strategy and then expand upon it but I can't get the basic structure set up correctly. 
Below is a copy of the description that I pasted here.

Opening (Entry Signal)

Open a new long position 2 points above the previous high when the following logic condition is satisfied:
the position opening price is higher than the Moving Average* (Simple, High, 26, 0).

Open a new short position 2 points below the previous low when the following logic condition is satisfied:
the position opening price is lower than the Moving Average* (Simple, Low, 26, 0).

Closing (Exit Signal)

Close an existing long position at Moving Average* (Simple, Low, 26, 0).

Close an existing short position at Moving Average* (Simple, High, 26, 0).


It's pretty simple, however if you will notice the high and low in bold I have had to change manually in this post.  Is it possible to have a slightly different strategy for long and short positions?

Thank you for your time.  Any help is appreciated.

Re: Different strategies for long and short positions

There is an indicator for 'Long or Short', you could try that.

Re: Different strategies for long and short positions

Why do you want to make a non-symmetrical strategy?

Re: Different strategies for long and short positions

I think it is symmetrical. Lets consider MA 26 as High/Low bands, and everything clicks together.

In current configuration closing point is hard to achieve, maybe median MA? Or if TF is small, then "closes below/above" logic for High and Low MAs.

Entry would look like this with the help of logical groups:

[Opening Point of the Position]
     Previous High Low
     Enter long at the previous high
     Base price  -  High and Low
     Vertical shift  -  20

[Opening Logic Condition]
     Moving Average
     [ A ]   The position opens above the Moving Average
     Smoothing method  -  Simple
     Base price  -  High
     Period  -  26
     Shift  -  0
     Use previous bar value  -  Yes

[Opening Logic Condition]
     Moving Average
     [ B ]   The position opens below the Moving Average
     Smoothing method  -  Simple
     Base price  -  Low
     Period  -  26
     Shift  -  0
     Use previous bar value  -  Yes

[Opening Logic Condition]
     Long or Short
     [ A ]   Open long positions only

[Opening Logic Condition]
     Long or Short
     [ B ]   Open short positions only

Re: Different strategies for long and short positions

Two MA can be used easily for creating a custom indicator for the opening and closing logic.

You can use Bollinger Bands for base.
The only change is that set the Upper Band = MA(High) and Lower Band = MA(Low).
It will work for all four types of slots.


double[] adUpBand = MovingAverage(period, shift, maMethod, Price(BasePrice.High));
double[] adDnBand = MovingAverage(period, shift, maMethod, Price(BasePrice.Low));