I am attempting to create a Public Variable when the strategy sees its account is Sim101, & calls Variable when it sees it is NOT Sim101.
In the Strategy I know how to access
Account Name = Account.Name
Strategy Name = MyCustomeStrategy
Instrument Name = Instrument.FullName
Profit Factor = SystemPerformance.AllTrades.TradesPerformance.Prof itFactor
The end product should ideally automatically generate a Dynamically named variable;
Public var (Strategy Name Instrument Name Profit Factor) = Profit Factor
The end product should also recognize what account it is trading on;
if Sim101 == Account.Name
Public var MyCustomeStrategyInstrumentNameProfitFactor = SystemPerformance.AllTrades.TradesPerformance.Prof itFactor
if Sim101 <> Account.Name
MyCustomeStrategyInstrumentNameProfitFactor > 1
The Sim101 account would make Public TradesPerformance metrics for the RealTime account. The Strategy running on the RealTime account will make sure minimum values are maintained. if logic is true = trade, 1 metric is false=no trade.
If there is a code already vetted, please point me in the correct direction. I know VBA for excel like the back of my hand but NinjaTrader Script is a new endeavor.
Comment