Update: More Trade Logic for Indicator Levels/Chart Values

Now that indicators can be used for trade management, logic needs to be added in order to allow for more flexible strategies. 


1. Entry Logic -- Indicator levels -- Right now we have exit logic based on indicators but we also need to add to the entry logic and have the ability to enter orders in advanced at an indicator level defined in a block. This would allow you to use strategies where you find x trade condition that set a limit order at a high/low in order to trade. Note: I am not talking about indicator conditions where x conditions need to occur for an order to be fired. I am talking about the placement of orders at indicator block levels after a condition has been met

There should be an option to recalculate the values for the order placement every bar for stop limit orders. By default this option will not be active which means orders will be placed at the level they are calculated to be at that moment and will not change. I.e. Mark mentioned earlier the ATR no longer recalculates every bar and the logic is based on where it is at the time of trade. 

However, because we are entering instead of exiting, it may provide benefit to recalculating the value stop limit order and moving it along with the updated indicator level it is placed at.


2. Exit Logic -- Nearest X level -- This would allow SQX to use the nearest X level as a target/stop where X is the value for the amount of iterative levels away. 
For example: SQX should be able to target the 2nd nearest high instead of the just the first. The same can apply to indicators with multiple levels both above and beneath them such as pivots etc.

https://screencast.com/t/3SXKWCq870

https://screencast.com/t/84xMbaeV

The tricky part is that you need logic that can handle individual indicators that have a lot of levels contained within them  such as pivots or high/low indicators and you need logic to accommodate for the nearest x level within that indicator AND we also need to accommodate for indicator blocks that are not the same indicator. 

A mode can be added for the nearest indicator level. I would recommend that there be a section where blocks can be added to that handles this logic. When adding an indicator block that has multiple levels within the given indicator, all of these levels are exposed to SQX along with any additional indicator blocks that the user adds. This way a user can keep the nearest x logic specific to pivots for example if that was the only indicator that was added, or they could and high/low and pivots together to get an algorithm that looks for the nearest x level between pivots or high/low so whichever level is nearest between the two indicators is used for this value.

All levels displayed on the chart from all indicator blocks are stored into memory and compared to the current price in order to find the nearest x level. This will make the logic calculate indiscriminate of each other indicator block.


3. Entry/Exit Logic -- Head/Tail Distance Threshold -- This would limit the distance to the level that SQX can trade.
For example: Say a user wanted to find strategies that traded at the low of the day. SQX can easily create a strategy that trades 10x ATR or 100+ pips above the low of the day. This would not be ideal for trying to find strategies that are unique to that level as the distance is too far. Limiting this distance to a max threshold in pips and in ATR forces SQX to work in a tighter range relative to the level used for trade entry. 

This would look at a minimum distance between the entry level and the current price that a condition must occur within in order for a trade to fire. 

There should be a Head/Tail setting where Head is the distance above a given indicator level and Tail is the distance below a given indicator level. For example, if I have x indicator condition that turns true to fire a trade, it must also be true that price is between the indicator level (Low of day) and + 2.5x ATR ( Head mode). So looking at the area below the Low of day for a trade would be Tail mode and look at -- 2.5x ATR below the Low of Day in this example; here this may be used as a breakout to go short. So one application of this is that will help support resistance traders identify S/R bounces and trade breakouts by looking at conditions to occur  within a certain region for order execution. 

Attachments
No attachments
  • Votes +9
  • Project SQ Programming
  • Type Feature
  • Status New
  • Priority Normal

History

KL
#1

keinc301

19.11.2018 15:33

Task created

h
#2

hankeys

18.12.2018 14:43
Voted for this task.
l
#3

ludvick

18.12.2018 14:56
Voted for this task.
TV
#4

Tomas Vanek

19.12.2018 00:18
Voted for this task.
c
#5

clonex

11.01.2019 13:10
Voted for this task.
cj
#6

cjl

14.01.2019 14:42
Voted for this task.
e
#7

eowithrand

04.02.2019 23:33
Voted for this task.
RL
#8

rickliao

09.02.2019 09:17
Voted for this task.
d
#9

Daniel

22.08.2019 14:59
Voted for this task.
e
#10

kim kyunghee

05.10.2019 18:18
Voted for this task.

Votes: +9

Drop files to upload

or

choose files

Max size: 5MB

Not allowed: exe, msi, application, reg, php, js, htaccess, htpasswd, gitignore

...
Wait please