NexusFi: Find Your Edge


Home Menu

 





Help in Sierra study Spreadsheet System for Trading


Discussion in Sierra Chart

Updated
    1. trending_up 2,667 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 9 posts
    2. attach_file 3 attachments




 
Search this Thread

Help in Sierra study Spreadsheet System for Trading

  #1 (permalink)
 foreverlearner 
Rio de Janeiro. Brazil.
 
Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Trading: Emini ES
Posts: 30 since Sep 2019
Thanks Given: 10
Thanks Received: 37

I am trying to work on a "Spreadsheet System for Trading" in Sierra Chart because I want to backtest a strategy.

But I cant find the correct formula for buying/selling the way I really want.

I am using one of their examples =CROSSFROMABOVE(ID0.SG4@3:ID0.SG4@4, ID1.SG1@3:ID1.SG1@4)
but sometimes the price does not cross the EMA, only touches it.

I really want to try 2 things:

1) BUY: When price comes from above (pullback) and touches the EMA buy at market at the next closing bar.

2) SELL: When price comes from bellow, Sell two tick under the EMA. (When in a Downtrend price pullback to the EMA, have the sell limit waiting two ticks bellow the EMA)


But I dont know how to say these to the spreadsheet.

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
About a successful futures trader who didn´t know anyth …
Psychology and Money Management
Better Renko Gaps
The Elite Circle
Cheap historycal L1 data for stocks
Stocks and ETFs
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
 
  #2 (permalink)
Willstar44
Australia
 
Posts: 10 since Feb 2018
Thanks Given: 1
Thanks Received: 2

I would do
( AA3 = your EMA or you can add ID0.SG4@3)

in k3 buy entry = if(D3<AA3 ,1,0)
so would be if the candle low(D3) of that candle is below EMA buy

and for sell = if(C3>AA3,1,0)
high of candle (C3)


2)
to get your spreadsheet trading to sell 2 wick under the EMA

change J24 ( Sell entry) = AA3-2 ( or what ever your want ) I normally change it to h3 and then I can change it on the fly
so this will set the price

and
change J71>J75 from M for market to L for limit

Reply With Quote
Thanked by:
  #3 (permalink)
 foreverlearner 
Rio de Janeiro. Brazil.
 
Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Trading: Emini ES
Posts: 30 since Sep 2019
Thanks Given: 10
Thanks Received: 37


I thank you @Willstar44 for your help, but it quite didnt work for me.

Using this "=if(D3<AA3 ,1,0)" gives me a Buy entry in every bar under the EMA, (which makes sense based on the formula). But the problem is: When the spreadsheet buys at the EMA and I get stoped, It buys again, because the price is under the EMA (as picture attached).

And the sel/buy 2 ticks away from the EMA, did not work for me, but I understood your formula.







Started this thread Reply With Quote
  #4 (permalink)
Willstar44
Australia
 
Posts: 10 since Feb 2018
Thanks Given: 1
Thanks Received: 2

oh that easy fix

k3 = if((D3-2)<AA3,1,0) ..... this will trigger every time when price is below EMA
k3 = =crossfromabove(D3-2 : D4-2,AA3:AA4) will only trigger when is cross EMA - it wont show on the chart because K4 so on wont change correctly

so what I would do in P3 = D3-2
then do K3 =crossfromabove(P3:P4,AA3:AA4)


then place your trade to MARKET
so if price was higher then EMA>>> then move down close to the EMA (2 away ) = trigger buy

I would change 2 = h3 then if you want to change it you can from 2 to eg: 5
AA3 = EMA or other indicator
D3 = candle low

you could use E3 ( last price) but then it could trigger and untrigger because price could bounce off EMA ( which you want ) so that that why I use candle Low


Reply With Quote
Thanked by:
  #5 (permalink)
Willstar44
Australia
 
Posts: 10 since Feb 2018
Thanks Given: 1
Thanks Received: 2

One issue your going to have , when price wick below EMA ... then back up ,

enter you long ( thinking it going to bounce )
Price goes lower then EMA ( hold long)
price goes higher then EMA ( thinking your going to dip of the EMA)
>>
Place you in a short


you need the system to find out if it trending ????

so you could do it like
if it touch the top of the BBands then touch EMA = BUY
but if it touch the bottom band then touch EMA= DONT BUY however sell

or
if the last 3 candle close below EMA = don't hold long
https://imgur.com/a/Jieac5l


Reply With Quote
  #6 (permalink)
 foreverlearner 
Rio de Janeiro. Brazil.
 
Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Trading: Emini ES
Posts: 30 since Sep 2019
Thanks Given: 10
Thanks Received: 37

Thanks Again! It Works fine now.

I did as you said using the "H3" and it is faster like that.

Another Question: Do you know how to programme a reversal?

Example: If I bought and the price went against me, I do 2 thing:
1) If it gets to my 8pt S.L – OK.
2) If it goes against me 6,5 points, open a reverse trade 2 ticks away form the EMA (like the Picture attached).



Started this thread Reply With Quote
  #7 (permalink)
 foreverlearner 
Rio de Janeiro. Brazil.
 
Experience: Beginner
Platform: NinjaTrader, Sierra Chart
Trading: Emini ES
Posts: 30 since Sep 2019
Thanks Given: 10
Thanks Received: 37

it seems like the picture wasnt uploaded.

This is it.


Started this thread Reply With Quote
  #8 (permalink)
Willstar44
Australia
 
Posts: 10 since Feb 2018
Thanks Given: 1
Thanks Received: 2


foreverlearner View Post
Thanks Again! It Works fine now.

I did as you said using the "H3" and it is faster like that.

Another Question: Do you know how to programme a reversal?

Example: If I bought and the price went against me, I do 2 thing:
1) If it gets to my 8pt S.L – OK.
2) If it goes against me 6,5 points, open a reverse trade 2 ticks away form the EMA (like the Picture attached).



in the spreadsheet setting , you can allow reversal



So if you are long, and if it triggers a short,
it will 2x the short to cancel your long and now place your in a 1x short
PS you don't need to add any thing in L3 or N3 (exits )

You could trigger it like
use H5 = 6.5 ( trigger reveral stop lost )
so would do something like

R3 = If in loseing postions more then H5 trigger reversal


Quoting 
R3 = =and(J5>0,E3 >(J9+H5))


Quoting 
the above but further explain
if J5 ( open postion is long ) , and avg price > the current price + h4 ( trigger reveral stop lost) = trigger reveral




then you trigger sell

I normally trigger each condition on a different row
then make Entry = if Row 1 , row 2 , etc = 1 then trigger
and if you want it to meet 2 conditions EG ,. cross EMA + volume of X .... then entry = if ( R3 + S3 + T3 = 3 ) = trigger entry

Reply With Quote
  #9 (permalink)
Willstar44
Australia
 
Posts: 10 since Feb 2018
Thanks Given: 1
Thanks Received: 2


foreverlearner View Post
it seems like the picture wasnt uploaded.

This is it.



you can use Attacted order to set stop lost and take profits




Reply With Quote
  #10 (permalink)
Willstar44
Australia
 
Posts: 10 since Feb 2018
Thanks Given: 1
Thanks Received: 2


you can also do it in the spread sheet

Attached Order Target Offset (write-only): J80
Attached Order Stop Offset (write-only): : J81

if you want to do it off 2 points from a EMA or other indicator

is a pain in the ass
you can placeTP order price at the EMA + 2 = J3
change order type to Limit order (L)
but I don't know how you place bother Stop and take profit at the same time

I do it with J80 and J81 or use Flatten J29
j29 . =and(lastprice> (EMA +2),position is not 0 )

does equal
Quoting 
=

does not equal
Quoting 
<>


Reply With Quote




Last Updated on April 14, 2020


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts