Can anyone help me? It would be a huge help and end a lot of frustrations.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Help with creating a strategy from custom indicator
Collapse
X
-
Help with creating a strategy from custom indicator
I would like to program a strategy to trigger longs and shorts when the the current bar crosses the entry line on the ABC portion of the PriceActionSwingPro indicator (Found Here https://www.bigmiketrading.com/ninja...iscussion.html). I have never written a strategy that refers to custom indicators so I want to know what needs to be put in the "using declarations" region, the "variables" region, etc. As far as the specific "if, thens" of the strategy i can figure out myself, but the aforementioned things are the things i need help with. This page of the thread (https://www.bigmiketrading.com/ninja...ussion-60.html) has a sample strategy written for a different version of the indicator, but I couldn't figure out what needed to be tweaked for the strategy to recognize the indicator i want to use.
Can anyone help me? It would be a huge help and end a lot of frustrations.Tags: None
-
Hello sra18376,
Thank you for your post.
You wouldn't need to add anything for the declarations. You would call this indicator like you would call the other indicators like SMA()
You would need to the full name of the indicator, your opening and closing parenthesis, and any inputs you need to pass through in the parenthesis
SMA(14)Cal H.NinjaTrader Customer Service
-
The only thing you would need to declare in the variables section would be a local variable that you would want to use for EntryLine.
You can even go the next step and create a User Defined Input so that you can change this value from the strategy settings when adding it to a chart
http://www.ninjatrader.com/support/f...ead.php?t=5782Cal H.NinjaTrader Customer Service
Comment
-
OK, i got an error message and I attached a picture of my screen. The balloon that pops up when i hover over the PriceActionSwingPro makes me think that I need to declare the dtbStrength, swingSize, swingType, and useCloseValues in the variables section. Is that correct? Also, I think the swingType is an Enum in the indicator. What should I do with this enum in the strategy?
Here is the image http://tinypic.com/view.php?pic=2mra...8#.U6-GtkBrBTsLast edited by sra18376; 06-28-2014, 09:37 PM.
Comment
-
Hello sra18376,
Thank you for your response.
You need to access the barsAgo index as well, but I would ask what you are trying to access with CurrentBar? Is this the current price you are attempting to access? If so, please use the following:
Code:if(Close[0] > PriceActionSwingPro(entryLevel1)[0])
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by trilliantrader, Today, 03:01 PM
|
0 responses
2 views
0 likes
|
Last Post Today, 03:01 PM | ||
Started by pechtri, 06-22-2023, 02:31 AM
|
9 responses
122 views
0 likes
|
Last Post Today, 02:31 PM | ||
Started by frankthearm, 04-18-2024, 09:08 AM
|
16 responses
67 views
0 likes
|
Last Post Today, 02:17 PM | ||
Started by habeebft, Today, 01:18 PM
|
1 response
8 views
0 likes
|
Last Post Today, 02:03 PM | ||
Started by benmarkal, Today, 12:52 PM
|
2 responses
19 views
0 likes
|
Last Post
by benmarkal
Today, 02:00 PM
|
Comment