Login Page - Create Account

Support Board


Date/Time: Tue, 23 Apr 2024 11:21:42 +0000



[Programming Help] - Help with spreadsheet trading ( double heiken ashi system )

View Count: 2871

[2018-03-29 09:24:28]
User651753 - Posts: 77
I have managed to get a system to trade with double Heiken Ashi candle, and not trigger if there a 3rd or more in a row ( reversal on change of color )

however, I need some idea to make it work correctly
example
RED
Green
RED
GREEN
GREEN ( 2nd green trigger long )
Red
GREEN
GREEN ( 2nd green trigger long, but I don't need to trigger again opening another trade as it already long

does anyone have any idea how I can get it not to trigger order if it already in a position that direction? I have J59 " Allow multiple enters in the same direction as = 0, but it still triggers

I have to manage to get out with trading by having max order and limit order set the same, but it still triggers in the spreadsheet and impact other calculations
[2018-03-30 20:38:43]
User701453 - Posts: 176
does anyone have any idea how I can get it not to trigger order if it already in a position that direction?

This link may help you with your solution.

Spreadsheet Example Formulas and Usage: Buy on First Signal and Ignore Multiple Signals
[2018-03-31 02:14:02]
User651753 - Posts: 77
thank you for your reply ,
I kinda want to set up another column that shows... the last cell = GREEN ... if it hasn't gone double red use the cell below . ( only change when new cell update different trend)

that link work if you have the bot going and it already in a trend and limit the entry not to trade 2nd or 3th
But - if you start the bot in between ... then it will trigger the 1st trade ... on the 2nd signal ( i only want to enter on the first signal regardless when you start the bot)
[2018-03-31 08:55:26]
User701453 - Posts: 176
You asked
does anyone have any idea how I can get it not to trigger order if it already in a position that direction?
The link provided the solution to your question.

The additional requirements/issues were not included in the original question.

( only change when new cell update different trend)
=IF("last cell=GREEN",1,IF("double red",0 ,IF(ISBLANK($H$4),0 ,$H$4)))

I use the above pesudo code block to lock a cell to a value in my own spreadsheets.
The value"1" does not change until an event happens that sets it back to "0".
You will need to modify to fit you code block.


that link work if you have the bot going and it already in a trend and limit the entry not to trade 2nd or 3th.But - if you start the bot in between ... then it will trigger the 1st trade ... on the 2nd signal ( i only want to enter on the first signal regardless when you start the bot)

Since your BOT takes a trade in the middle of the trend when you first start it up.
Then your code must have already established a valid trend direction.

So you will need to write code to ignore any trade signal,until there is a "NEW" trend change..
Once a new trend change occurs, then allow processing of the first trading signal using the link previously provided.
I would suggest you review the entire support page that links refers to.
Not just that one particular code block.
Date Time Of Last Edit: 2018-03-31 08:58:50
[2018-03-31 09:01:38]
User651753 - Posts: 77
thankyou for the code,
found it very helpful, gave me a better understanding how to get around it, thank you
[2018-04-03 02:14:42]
User651753 - Posts: 77
=IF("last cell=GREEN",1,IF("double red",0 ,IF(ISBLANK($H$4),0 ,$H$4)))

IS this the only way to do (IF OR ).
so if P3=1 or M3=1 >>>> then display as true or false , so either cell has the requesting display as TRUE or FALSE

can you use
IFAND
IFOR
??
[2018-04-03 02:43:29]
User701453 - Posts: 176
can you use
IFAND
IFOR
??
Yes to all above.

I would highly suggest that you start with this link and spend some time going thru the Sierra spreadsheet documentation.
It will make your life of using spreadsheets a lot easier.
Working with Spreadsheets

It appears that you may have not used excel spreadsheet formulas before.
Google is an excellent resource to learn how to use spreadsheet cell formulas.
https://www.google.com/search?hl=en&source=hp&ei=C-nCWqqbFe62ggeE5KvgCw&q=excel+formulas&oq=excel+formulas
[2018-04-03 02:48:34]
User651753 - Posts: 77
thanks for the tips.
[2018-04-05 03:05:12]
User651753 - Posts: 77
could you please give me an example of IFOR I couldn't find it in the link you shared

I am looking for if the price is higher then MA+20 or lower then MA-20 = 1
so if either outcome is true -1

while =AND both have to be true.


at the moment I've been getting around it with this

=if(E3>AA3,1,if(E3<AC3,1,0))



I am guessing it hase to look like this
=IFOR( condition 1 , condition 2 , if either or both are correct =1, if both are NOT correct =0)

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account