Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Spread Size Filter with NT8 Strategy Builder
Collapse
X
-
Spread Size Filter with NT8 Strategy Builder
Hey all, trying to build a Boolean filter within the SB that will only allow trades when the bid/ask spread is under 22ticks. I'm pretty sure I set up the Boolean part correctly, however I'm not so sure the actual "filter" is correct. (See pic below) The pic show the event of the spread being to big. The "tick" size is linked to an input and currently set to 1. Any thoughts?1 PhotoTags: None
-
Hello White Fork,
Something to keep in mind:
Using Price -> Ask here in the Strategy Builder would use GetCurrentAsk().
In realtime this would be the current as price. In historical (without TickReplay), this would return the bar close price.
From the help guide.
"When accessed during State.Historical, the Close price of the evaluated bar is substituted. To access historical Ask prices, please see Developing for Tick Replay."
I'm not sure what the SpreadOffset value is set to, but yes, this would add that many ticks to the whatever the current bid is.
This condition checks that the current ask is less than the bid plus however many ticks the SpreadOffset represents. If SpreadOffset is set to -20 this would subtract 20 ticks.
I would recommend you print these values to ensure these are the values you want.
Below is a link to a forum post that includes a video that demonstrates how to use prints in the Strategy Builder to print the values used in the conditions.
Chelsea B.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by burtoninlondon, Today, 12:38 AM
|
0 responses
10 views
0 likes
|
Last Post Today, 12:38 AM | ||
Started by AaronKoRn, Yesterday, 09:49 PM
|
0 responses
14 views
0 likes
|
Last Post
by AaronKoRn
Yesterday, 09:49 PM
|
||
Started by carnitron, Yesterday, 08:42 PM
|
0 responses
11 views
0 likes
|
Last Post
by carnitron
Yesterday, 08:42 PM
|
||
Started by strategist007, Yesterday, 07:51 PM
|
0 responses
13 views
0 likes
|
Last Post Yesterday, 07:51 PM | ||
Started by StockTrader88, 03-06-2021, 08:58 AM
|
44 responses
3,983 views
3 likes
|
Last Post
by jhudas88
Yesterday, 06:59 PM
|
Comment