by robbieyoung » Mon Jul 17, 2023 5:01 am
Strategy Rules:
1 - Specify whether Buy or Sell or Both is the first allowed side when first starting the strategy - this is to prevent the strategy from starting in the middle of a Buy/Sell phase instead of at the beginning.
2 - Specify the maximum balance (not equity) to date and the %age of this maximum balance to use to determine the size of the trade (T) - maximum balance figure would be updated if a higher maximum balance was attained during a trading session.
3 - The strategy would use either of following 2 logics : (so may require 2 separate strategy files)
Fast SMA crosses above the slow SMA, close sell trade (if open) and open a buy trade of size T.
Fast SMA crosses below the slow SMA, close buy trade (if open) and open a sell trade of size T.
Both SMAs would need to handle values which range from MA(1) to MA(1600).
Or
When the SMA moves up X times, close sell trade (if open) and open a buy trade of size T.
When the SMA moves down X times, close buy trade (if open) and open a sell trade of size T.
The SMA would need to handle values which range from MA(1) to MA(1600).
The number of X times would need to range from moving up or down 1 time to 124 times.
The current strategy I have been using may have been built initially with FXStrategyWizard and then recoded by someone else so I would love this to be simplified if at all possible.
I currently copy the code to excel and use excel to code the logic relating to the MA moving up X times as this becomes very large when you get up to 124 times.
Thanks for any help that you might give,
Robbie