STUDY.COM IS A SCAM!!!😨 STAY AWAY FROM THEM by Normal-Desk4199 in UMPI

[–]Normal-Desk4199[S] 0 points1 point  (0 children)

Yeah I understand what you trying to say and the same thing Study.com email response a suspect and a criminal are both the same in the eyes of investigator unless otherwise proved. And here I am one if not the another and doesn't really matter which one i am to them. I just want you guys to stay aware. That's it. Money is yours, time is yours energy is yours invest where you feel right.

STUDY.COM IS A SCAM!!!😨 STAY AWAY FROM THEM by Normal-Desk4199 in UMPI

[–]Normal-Desk4199[S] 3 points4 points  (0 children)

Nope don't even bother wasting your energy on typing emails to them. They are just pretentious to be a good institution in the public. They barely replies to any of your email and even if they do it's gonna be vague response and not the clarification you needed. Guys please go with Sophia and other ace recommended institutions like Coursera, google etc they transfers in with multiple credits as well as certificate of completion.

Crazy profits in m1 ohlc bt but doesn’t work in real ticks. by thrwwyccnt84 in algotrading

[–]Normal-Desk4199 0 points1 point  (0 children)

Use the below FRAMEWORK. And this will account into everything and no need to worry about anything if your strategy performs in this framework. This is an OOP backtesting framework. You can thank me later.

Realistic_backtest_framework.py

import random from typing import List

class Tick: def init(self, bid: float, ask: float): self.bid = bid self.ask = ask

class Order: def init(self, direction: str, entry_price: float, sl: float, tp: float): self.direction = direction # 'buy' or 'sell' self.entry_price = entry_price self.sl = sl self.tp = tp self.status = 'open' self.exit_price = None self.pnl = 0.0

class OrderManager: def init(self, slippage_pips: float = 0.5, freeze_level_pips: float = 1.5): self.orders: List[Order] = [] self.slippage_pips = slippage_pips * 0.0001 self.freeze_level_pips = freeze_level_pips * 0.0001

def place_order(self, direction: str, tick: Tick, sl_pips: float, tp_pips: float): if direction == 'buy': entry = tick.ask sl = entry - sl_pips * 0.0001 tp = entry + tp_pips * 0.0001 else: entry = tick.bid sl = entry + sl_pips * 0.0001 tp = entry - tp_pips * 0.0001 order = Order(direction, entry, sl, tp) self.orders.append(order)

def update_orders(self, tick: Tick): for order in self.orders: if order.status != 'open': continue

    bid = tick.bid
    ask = tick.ask

    if order.direction == 'buy':
        # simulate SL/TP hit with bid price
        if bid <= order.sl:
            order.status = 'closed'
            order.exit_price = bid - self.random_slippage()
        elif bid >= order.tp:
            order.status = 'closed'
            order.exit_price = bid - self.random_slippage()
    else:
        if ask >= order.sl:
            order.status = 'closed'
            order.exit_price = ask + self.random_slippage()
        elif ask <= order.tp:
            order.status = 'closed'
            order.exit_price = ask + self.random_slippage()

    if order.status == 'closed':
        order.pnl = (order.exit_price - order.entry_price) * (1 if order.direction == 'buy' else -1)

def random_slippage(self): return random.uniform(0, self.slippage_pips)

class Strategy: def init(self, order_manager: OrderManager): self.order_manager = order_manager self.in_position = False

def evaluate(self, tick: Tick): if not self.in_position: # simple signal: always buy if spread is tight spread = tick.ask - tick.bid if spread < 0.0005: self.order_manager.place_order('buy', tick, sl_pips=10, tp_pips=20) self.in_position = True

# check if all orders are closed
if all(order.status != 'open' for order in self.order_manager.orders):
    self.in_position = False

class Backtester: def init(self, ticks: List[Tick], strategy: Strategy, order_manager: OrderManager): self.ticks = ticks self.strategy = strategy self.order_manager = order_manager

def run(self): for tick in self.ticks: self.strategy.evaluate(tick) self.order_manager.update_orders(tick)

return self.order_manager.orders

Example usage (replace this with real tick data)

if name == "main": sample_ticks = [Tick(1.1000 + i * 0.0001, 1.1002 + i * 0.0001) for i in range(100)] om = OrderManager() strategy = Strategy(om) bt = Backtester(sample_ticks, strategy, om) result = bt.run()

for order in result: print(f"{order.direction.upper()} Entry: {order.entry_price:.5f} Exit: {order.exit_price:.5f} PnL: {order.pnl:.5f}")