Ninjatrader strategies

C# Outros Forex C# OpenCL

Termos de Referência

3B Strategy

Overview

While the spec breaks this down into step by step details, the model itself is low complexity, as its all done within 3 candles and simple exit criteria (no scaling, etc), intentionally done so for short time to market and management.


Assumptions:

  1. The strategy should run for one-to-many accounts, ideally avoiding a trade copier and keeping all control in our code.

  2. Multiple trades can be live at once and are independent of any other trade. (meaning we could be both long and short the same instrument).



  1. 3 candle pattern Setup: We will have a 3 candle pattern that this strategy is based on - for our purposes we will refer to those 3 candles as C1, C2, C3.   

    1. C1 - Order Block (OB) as defined in below spec. 

    2. C2 - The close of this candle determines if C1 is an OB or not, details below.

    3. C3 - in this strategy only C3 can be the Entry candle - Entry order would be at the opening price of the order block (C1).


  1. Orderblock identification logic (C1):

    1. Bullish OB : A candle is identified as Bullish OB if it closes lower than its open (meaning the Bullish OB is a red candle itself), followed by a subsequent candle (C2) closing above the high of the OB candle (meaning for Bullish OB, C2 is a green candle)

    2. Bearish OB: A candle is identified as Bearish OB if it closes higher than its open (meaning the Bearish OB is a green candle itself), followed by a subsequent candle (C2) closing below the low of the OB candle (meaning for Bearish OB, C2 is a red candle)


  1. Entry Conditions (C3) - Once the OB is identified, and OCO order should be placed that exists only for the life of this C3 candle.  If the trade is not triggered before the C3 candle closes, then the OB candle is no longer active for trading the 3B setup and the order is canceled.  

    1. For Bullish OBs 

      1. Order Type:  OCO - one cancels the other

      2. Direction:  Long

      3. Entry Price = OB (C1) Open 

      4. Stop:  Lowest low of C1/C2.

      5. Exit Target:  1R.   (ex. If we enter long at 100, stop at 90, target would be 110)

      6. Size (Number of Contracts):  Percent  of Account size will be used to calculate the number of contracts to enter. This is defaulted to 10%   See Appendix for Size calculation details for each instrument.

    2. For Bearish OBs  

      1. Order Type:  OCO - one cancels the other

      2. Direction:  Short

      3. Entry Price = OB (C1 Open

      4. Stop:  Highest high of C1/C2.

      5. Exit Target:  1R.   (ex. If we enter short at 100, stop at 120, target would be 80)

      6. Size (Number of Contracts):  Percent  of Account size will be used to calculate the number of contracts to enter. This is defaulted to 10%   See Appendix for Size calculation details for each instrument.



  1. TimeFrames and instruments in scope:  we will want to apply this setup to a number of tickers and timeframes for those tickers.  Whether that is best achieved by setting up this strategy one by one for each ticker/time frame combination, or if this one script can be configured for all the combinations is TBD based on the preference would be for whichever provides a more stable/high performing result.. Most probably the time frames are 5 Minutes, 15 Minutes and 1 Hour


  1.  Protection Features - as we are dealing with trading, we need to have robust protection features in place to ensure we dont get run-away behaviors. As such we need to place parameters is for:

    1. Max allowable trade Size - a dollar figure set by the user, default is $10000



Appendix

Trade Size Calculation (number of contracts):

We will calculate trade size based on percentage of total account size, ex. 10% of account size.  This will give us a dollar value of what we have as maximum (max) risk. 


We will then take this max risk number and use it to calculate the number of contracts to trade based on the instrument and the matrix below.


Detailed Steps:

  • 1. Requesting Account Size:

  • 2. Determining Max Trade Size:

    • Calculate the dollar amount to risk by multiplying the account size by the user-defined percentage, Ex 10%

  • 3. Instrument-Specific Calculation:

    • For each trade, use the calculated dollar amount to risk, along with the instrument's tick size and tick value, to determine the number of contracts or shares to trade.

    • The formula for this calculation is: 

      • Trade Size (Number of Contracts = Dollars risk per Trade / (Stop size in Tricks * Tick Value)

 

Instrument/Tick Size/Tick Value Matrix:

Instrument

Tick Size

Tick Value (USD)

MES (Micro E-mini S&P 500 Futures)

0.25

$1.25

MNQ (Micro E-mini NASDAQ-100 Futures)

0.25

$0.50

MCL (Micro Crude Oil Futures)

0.01

$0.10

MGC (Micro Gold Futures)

0.10

$1.00

M2K (Micro E-mini Russell 2000 Futures)

0.10

$0.50

MYM (Micro E-mini Dow Jones Futures)

1.00

$0.50


Example calculation:

To calculate the number of contracts to trade for the MNQ (Micro E-mini NASDAQ-100 Futures) with a $100 maximum risk size,  and a 10 tick stop size, we'll use the formula for trade size:

Let's define:

  • Dollar Risk per Trade: $100

  • Stop Size in Ticks: We'll need to define this based on your strategy. For this example, let's assume a stop size of 10 ticks.

  • Tick Value for MNQ: $0.50 per tick

Given these values, we can calculate the number of MNQ contracts to trade to not exceed a $100 risk.

Let's perform this calculation

Based on the given parameters ($100 maximum risk size, 10 tick stop size, and a tick value of $0.50 for MNQ), you would trade 20 contracts of the MNQ (Micro E-mini NASDAQ-100 Futures) to not exceed a $100 risk.




Example 1: Bullish OB Entry, Target hit. 

March 22, 2024, 4:05am EST, 5 minute chart



Example 2: Bearish OB Entry, Target hit.

March 21, 2024, 12:25pm EST, 5 minute chart



Example 3: Bullish OB Entry, Trade failed, Stop Hit:

March 22, 2024, 10:40am EST, 5 minute chart


Example 4: Bearish OB Entry, Trade failed, Stop Hit:

March 22, 2024, 13:30pm EST, 5 minute chart



Pedidos semelhantes
my style of trade is to manually scale position size up & down from 1 to 100+ micros as the market moves, so the indicator I need has nothing to do with scaling in & out of the position, but I need an indicator that dynamically trails the position P&L, And has a trailing daily max loss that will reject new order entry if triggered. Example is setting a $350 Position auto stop-loss so as I scale in & out of contracts
Hi, i have a simple strategy which has 4 different types of entries based on parabolic sar and moving average that I would like to be coded into an EA. I would also like some inputs for it like news filter, time start and time end, risk % and so on. Will discuss further upon application
I want a developer who can develop an EA that enter a trade that is opposite of what 15m Candles does(example: if the 15m Candlestick is buying you put selling order and when is selling it place buying orders) 10 Seconds before 3 Bulls Major News and Nasdaq Open and once it has triggered it enter 1 trade whenever each position has moved 10 points and it does so continually until it has entered 10 position and
Hey there, I need to convert an indicator from ninja to mt4 I will attach the ninjatrader indicator script to be converted into mt4 If you can do this kindly bid and let's discuss about the project Thanks
Hi, I need to add a module to existing EA to enalbe it to buy and sell baskest of stocks and indicies. What I need: - synthetic chart in MT5 of e.g. combination of 2 long stocks and 5 shorted stocks. I need to be able to easily create new charts of the mixes of stocks / indicies. - matrix / panel of the chosen stocks' CFDs which tickers one will choose from the Symbol list (at particular broker symbol list) - adding
I have already develop metatrader 4 indicator that is exhibiting some error which in turn making the indicator to misbehave so what i need right now is to correct the error, if you are very good in mql4 language, please bid and figure out this can be solve and make it works the way i want it to work
Please I need a profitable EA with any of the following criteria; Hedge Trading Hedging trades is permitted however, hedging separate accounts against each other (known as Wash Trading) is not permitted and is a direct violation of the OnlyFunds’ Terms and Conditions. Wash trading is illegal and considered to be fraudulent, as it undermines the integrity of financial markets. Swing Trading Swing trading is
Looking for a developer of profitable EA tested for over 2 or more years time history of profits with investors read me only access as proof of usage. MT4 or MT5
Adjust MY Hedging EA 30 - 40 USD
1. Need averaging TP for my hedging EA. (Close both Buy and Sell position with TP) 2. Add function auto/manual entry. (EA will entry based on manual position(placed by trader) or auto trade based on existing setting)
I am in search of a skilled robot developer to craft a Martingale with Hedge strategy algorithm. The ideal candidate will possess deep expertise in algorithmic trading, proficiency in programming languages, and a keen understanding of financial markets. The role entails designing and implementing an automated system capable of effectively executing the Martingale strategy while integrating a hedge mechanism to manage

Informações sobre o projeto

Orçamento
30 - 50 USD
Desenvolvedor
27 - 45 USD
Prazo
para 4 dias