My strategy opens positions in accordance to change of trend. To
determine a trend change I used a T3 indicator. If Current value of T3
is less than previous it is a signal to close all BUY positions and
open Sell unless receive next signal to BUY.
Logic to open SELL position:
- If receive signal from T3 indicator to Sell, strategy summarizes the
last values of Support and Resistance indicator and devided by 2 like
the following (S+R)/2= Open Price.
-When got an open price, strategy checks the following if
bidBar.getClose() >= T3 value
If YES - Open SeLL position at Market price
If NO - Creates the SellLimit price that equal to OpenPrice.
SL Price is calculated as a double distance from Open price to the
last value of Resistance -
SL Price = (Resistance - T3 value)*2+ Open Price. -For SellLimit
orderrs;
SL Price = (Resistance - bidBar.getClose())*2+bidBar.getClose() -
for Sell orders Market price.
For BUY signals all the calculations does in inverse ratio.
Time frame is 1H;
TP - 155;
T3 period - 8, Vfactor - 0.05;
S_and_R indicator has common parametres.
Order volume is depends on a risk value. Here I used a 6% of risk.
That means if position reached a SL ,it will bring loss in a 6% of a
balance. Calculation Formula is
amount=((((_equity*leverage)/100)*(risk/SL*100))/1000000)/10000.
I create this strategy in result of Idea, that nobody uses such. Or
I didn't found any other examples as mine. I used a T3 indicator
because it filters good a market noise and Support and Resistance give
a good prices to enter the market. In one year with this parametres my
strategy shown a good performance on a historical tester.
*Remarks: Due to some errors that was given by SandR indicator I had
to use workaround methods. Such problems appear when SL price that
depends on SandR was lower then OpenPrice while SELL and higher than
OpenPrice while BUY. This results to a negative value of a STOP LOSS
and Order Amount. Therefore I found a solution to apply minus symbol
ahead of these negative values.