I read all tips and samples about strategy development. But already i can't code my strategy idea(Before i wrote dozzens of indicator for ninja trader platform). Samples very basic and there is not any complex sample. Could you please help me. My idea so complex and have many drudgery steps. But basically:
PHASE 1) Give Order
1-If price above 200SMA and price.close crossabove EMA50 (this is signal bar) go long next bar
2-Long like this,
entry...3 unique 1lot size position signalbar.high + 10pip (3 times BuyStop Order)
stoploss... all position stopploss same entryprice - 50pip
takeprofit...each position takeprofit different 1.entryprice+50pip, 2.entryprice+100pip, 3.0pip(we'll trail via EMA)
4-If price below 200SMA and price.close crossbelow EMA50 (signal bar) go short
5-Short like this,
entry...3 unique 1lot size position signalbar.low - 10pip (3 times SellStop Order)
stoploss... all position stopploss same entryprice + 50pip
takeprofit...each position takeprofit different 1.entryprice-50pip, 2.entryprice-100pip, 3.0pip(we'll trail via EMA)
PHASE 2) Manage Orders
1-If BuyStop order not triggered and Bars after signal bar crossbelow 50EMA all orders cancel(we will wait other cross for entry)
2-If SellStop order not triggered and Bars after signal bar crossabove 50EMA all orders cancel(we will wait other cross for entry)
3-If any order filled, If trio target1 is attain then other two position will move breakeven(stoploss levels don't change if this event don't accrue). Then if target2 is attain, so we have only one open position at this time, we start follow market via 20EMA. I mean we have to update stoploss level via 20EMA value each bar close
4-More importantly maybe we have many orders at any time I mean maybe price cross 50EMA more then one but we have to manage this trios separately.
I don't imagine all problems about open positions in this strategy. I mean suppose we give an BuyStop Order next bar open with GAP more then our enttry price. So this order maybe have to update Buy Limit. Actually i have difficulties about order management phase.
If you write this sample i'll continue to write to my orginal idea. Plus excuse me about my poor English. Thanks.
Best Regards.


Comment