Modifying NT or DS startegy to my logic
Originally from ticket #3277.
Hello,
Can someone please help here. I am struggling.
Can you please show me a complete adapted strategy to a simple logic here. I think if you provide me with a template with appropriate code for this logic described below, I can adapt from there. I love the features in the NT and DS frameowk, as shown in the Ninja Buddy, so the idea is to use those features (like stop, trail, position etc) and have the logic below issue the buy and sell.
Logic (it is hypothetical, just so I can learn this).
If High> High[1] then buy this bar on close
If Low< Low[1] then sell this bar on close
The qty to trade, I believe can be set in the Ninja Buddy, but since this is going to AutoTrade, please point me where to set that.
It would mean a lot to my learning if you could implement the above logic in a sample NT AND DS code and send that to me so I can review, follow, learn and enhance.
Many Thanx
Sanjay
**************************************************************************************************************************************************************************************
You can install the MTDS - and the SDK examples
Edit Strategy Select MTDS Test Harness Example
it uses no indicators and is very simple
Save it as a copy
Replace/Add your own code
Add your logic to the
public override bool TradeEntryValidate(bool isLong)
{
bool result= false;
if(isLong)
{
result=High> High[1];
}
else
{
result = Low< Low[1];
}
return result;
}
Other Examples
Open up the USAR example and see how many other features are used in that example
TIP note that indicators are referenced with a leading reference _indicator
_indicator.EMA(10)[0]
MicroTrends Support
support@microtrends.co
http://www.microtrends.co/support/
Tip! You can visit the help desk forum to see previous answered frequently asked questions:
http://microtrends.zendesk.com/forums
Please sign in to leave a comment.
Comments
0 comments